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>

public class ToggleSet<T> extends HashSet<T>
See Also:
  • Constructor Details

    • ToggleSet

      public ToggleSet()
  • Method Details

    • toggle

      public boolean toggle(T element)
      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