Package ru.cwcode.cwutils.collections
Class ToggleSet<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.HashSet<T>
ru.cwcode.cwutils.collections.ToggleSet<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,Set<T>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
ToggleSet
public ToggleSet()
-
-
Method Details
-
toggle
Adds the specified element to this set if it is not already present. Removes the specified element from this set if it is present. return false, if element has not been in collection, true if been
-