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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAll(Iterable<? extends T> values) Determines if the Set contains all values in the specified collection.booleancontainsAll(Iterator<? extends T> values) Determines if the Set contains all values in the specified collection.booleancontainsAny(Iterable<? extends T> values) Determines if the Set contains any values in the specified collection.booleancontainsAny(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 SetbooleangetSet()inthashCode()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, waitMethods inherited from interface org.javimmutable.collections.ICollection
isEmpty, isNonEmpty, sizeMethods inherited from interface org.javimmutable.collections.InvariantCheckable
checkInvariantsMethods inherited from interface org.javimmutable.collections.ISet
contains, delete, deleteAll, deleteAll, find, get, getValueOr, insert, intersection, intersection, reject, select, setCollector, unionMethods inherited from interface org.javimmutable.collections.IStreamable
getSpliteratorCharacteristics, iterator, parallelStream, spliterator, streamMethods inherited from interface org.javimmutable.collections.SplitableIterable
forEachThrows, indexedForEach, indexedForEachThrows, reduce, reduceThrows
-
Constructor Details
-
AbstractSet
public AbstractSet()
-
-
Method Details
-
insertAll
Description copied from interface:ISetAdds all of the elements of the specified collection to the set. -
insertAll
Description copied from interface:ISetAdds all of the elements of the specified collection to the set. -
containsAll
Description copied from interface:ISetDetermines if the Set contains all values in the specified collection.- Specified by:
containsAllin interfaceISet<T>- Returns:
- true if the Set contains the values
-
containsAll
Description copied from interface:ISetDetermines if the Set contains all values in the specified collection.- Specified by:
containsAllin interfaceISet<T>- Returns:
- true if the Set contains the values
-
containsAny
Description copied from interface:ISetDetermines if the Set contains any values in the specified collection.- Specified by:
containsAnyin interfaceISet<T>- Returns:
- true if the Set contains a value
-
containsAny
Description copied from interface:ISetDetermines if the Set contains any values in the specified collection.- Specified by:
containsAnyin interfaceISet<T>- Returns:
- true if the Set contains a value
-
deleteAll
Description copied from interface:ISetRemoves all values of other from the Set. Has no effect if none of the values are in the Set -
union
Description copied from interface:ISetAdds all values from other to the Set. -
intersection
Description copied from interface:ISetRemoves all values from the Set that are not contained in the other collection.- Specified by:
intersectionin interfaceISet<T>- Returns:
- instance of set with unmatched values removed
-
intersection
Description copied from interface:ISetRemoves all values from the Set that are not contained in the other collection.- Specified by:
intersectionin 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
-