contains

open operator override fun contains(element: E): Boolean

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Return

true if this set contains the specified element

Parameters

o

object to be checked for containment in this set

Throws

if the specified object cannot be compared with the elements currently in the set

if the specified element is null and this set uses natural ordering, or its comparator does not permit null elements