Satisfied Interfaces: Category, Cloneable<Set<Element>>, Collection<Element>, Iterable<Element,Null>
Direct Known Satisfying Classes: LazySet<Element>, emptySet

A collection of unique elements.

A Set is a Collection of its elements.

Sets may be the subject of the binary union, intersection, and complement operators |, &, and ~.

Attributes
hashSource Code
shared actual default Integer hash

The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that if x==y then x.hash==y.hash.

Refined declaration: hash
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Cloneable<Clone>
Attributes inherited from: Collection<Element>
Attributes inherited from: Iterable<Element,Absent>
Methods
complementSource Code
shared formal Set<Element> complement<Other>(Set<Other> set)
given Other satisfies Object

Returns a new Set containing all the elements in this Set that are not contained in the given Set.

equalsSource Code
shared actual default Boolean equals(Object that)

Two Sets are considered equal if they have the same size and if every element of the first set is also an element of the second set, as determined by contains().

Refined declaration: equals
exclusiveUnionSource Code
shared formal Set<Element|Other> exclusiveUnion<Other>(Set<Other> set)
given Other satisfies Object

Returns a new Set containing only the elements contained in either this Set or the given Set, but no element contained in both sets.

intersectionSource Code
shared formal Set<Element&Other> intersection<Other>(Set<Other> set)
given Other satisfies Object

Returns a new Set containing only the elements that are present in both this Set and the given Set.

subsetSource Code
shared default Boolean subset(Set<Object> set)

Determines if this Set is a subset of the given Set, that is, if the given set contains all of the elements in this set.

supersetSource Code
shared default Boolean superset(Set<Object> set)

Determines if this Set is a superset of the specified Set, that is, if this Set contains all of the elements in the specified Set.

unionSource Code
shared formal Set<Element|Other> union<Other>(Set<Other> set)
given Other satisfies Object

Returns a new Set containing all the elements of this Set and all the elements of the given Set.

Inherited Methods
Methods inherited from: Category
Methods inherited from: Iterable<Element,Absent>