Interface Set<E>
- All Superinterfaces:
Iterable<E>
,Iterable<E>
,Traversable<E>
- All Known Subinterfaces:
SortedSet<E>
- All Known Implementing Classes:
AbstractSet
,AbstractSortedSet
,HashSet
,TreeSet
Set defines the interface for a unique set of values as defined by
Object.equals(Object)
.-
Method Summary
Modifier and TypeMethodDescriptionReturns a set that adds the specified value if it doesn't already exist in this set.asSet()
Returns an immutable view of this set as an instance ofjava.util.Set
.boolean
Returns true if the value exists in this set.Removes the specified value from the set if it exists.Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet
-
Method Details
-
add
Returns a set that adds the specified value if it doesn't already exist in this set. -
remove
Removes the specified value from the set if it exists. -
contains
Returns true if the value exists in this set. -
asSet
Returns an immutable view of this set as an instance ofjava.util.Set
.
-