Class AbstractSet<T>
java.lang.Object
org.javimmutable.collections.common.AbstractSet<T>
- All Implemented Interfaces:
Serializable
,Iterable<T>
,ICollection<T>
,InvariantCheckable
,ISet<T>
,IStreamable<T>
,Mapped<T,
,T> SplitableIterable<T>
- Direct Known Subclasses:
AbstractSetUsingMap
,EmptyHashSet
,HashSet
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsAll
(Iterable<? extends T> values) Determines if the Set contains all values in the specified collection.boolean
containsAll
(Iterator<? extends T> values) Determines if the Set contains all values in the specified collection.boolean
containsAny
(Iterable<? extends T> values) Determines if the Set contains any values in the specified collection.boolean
containsAny
(Iterator<? extends T> values) Determines if the Set contains any values in the specified collection.Removes all values of other from the Set.Implemented by derived classes to create a new empty Setboolean
getSet()
int
hashCode()
Adds all of the elements of the specified collection to the set.Adds all of the elements of the specified collection to the set.intersection
(Iterable<? extends T> other) Removes all values from the Set that are not contained in the other collection.intersection
(ISet<? extends T> other) Removes all values from the Set that are not contained in the other collection.toString()
Adds all values from other to the Set.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.javimmutable.collections.ICollection
isEmpty, isNonEmpty, size
Methods inherited from interface org.javimmutable.collections.InvariantCheckable
checkInvariants
Methods inherited from interface org.javimmutable.collections.ISet
contains, delete, deleteAll, deleteAll, find, get, getValueOr, insert, intersection, intersection, reject, select, setCollector, union
Methods inherited from interface org.javimmutable.collections.IStreamable
getSpliteratorCharacteristics, iterator, parallelStream, spliterator, stream
Methods inherited from interface org.javimmutable.collections.SplitableIterable
forEachThrows, indexedForEach, indexedForEachThrows, reduce, reduceThrows
-
Constructor Details
-
AbstractSet
public AbstractSet()
-
-
Method Details
-
insertAll
Description copied from interface:ISet
Adds all of the elements of the specified collection to the set. -
insertAll
Description copied from interface:ISet
Adds all of the elements of the specified collection to the set. -
containsAll
Description copied from interface:ISet
Determines if the Set contains all values in the specified collection.- Specified by:
containsAll
in interfaceISet<T>
- Returns:
- true if the Set contains the values
-
containsAll
Description copied from interface:ISet
Determines if the Set contains all values in the specified collection.- Specified by:
containsAll
in interfaceISet<T>
- Returns:
- true if the Set contains the values
-
containsAny
Description copied from interface:ISet
Determines if the Set contains any values in the specified collection.- Specified by:
containsAny
in interfaceISet<T>
- Returns:
- true if the Set contains a value
-
containsAny
Description copied from interface:ISet
Determines if the Set contains any values in the specified collection.- Specified by:
containsAny
in interfaceISet<T>
- Returns:
- true if the Set contains a value
-
deleteAll
Description copied from interface:ISet
Removes all values of other from the Set. Has no effect if none of the values are in the Set -
union
Description copied from interface:ISet
Adds all values from other to the Set. -
intersection
Description copied from interface:ISet
Removes all values from the Set that are not contained in the other collection.- Specified by:
intersection
in interfaceISet<T>
- Returns:
- instance of set with unmatched values removed
-
intersection
Description copied from interface:ISet
Removes all values from the Set that are not contained in the other collection.- Specified by:
intersection
in interfaceISet<T>
- Returns:
- instance of set with unmatched values removed
-
getSet
-
hashCode
public int hashCode() -
equals
-
toString
-
emptyMutableSet
Implemented by derived classes to create a new empty Set
-