Class ObjectSets.EmptySet<K>

java.lang.Object
java.util.AbstractCollection<K>
All Implemented Interfaces:
ObjectCollection<K>, ObjectIterable<K>, ObjectSet<K>, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<K>, java.util.Collection<K>, java.util.Set<K>
Direct Known Subclasses:
ObjectSortedSets.EmptySet
Enclosing class:
ObjectSets

public static class ObjectSets.EmptySet<K>
extends ObjectCollections.EmptyCollection<K>
implements ObjectSet<K>, java.io.Serializable, java.lang.Cloneable
An immutable class representing the empty set and implementing a type-specific set interface.

This class may be useful to implement your own in case you subclass a type-specific set.

See Also:
Serialized Form
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object clone()  
    boolean equals​(java.lang.Object o)  
    boolean remove​(java.lang.Object ok)  

    Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection

    toString

    Methods inherited from class java.util.AbstractCollection

    add, isEmpty

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, removeIf, stream, toArray

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectSet

    iterator, spliterator

    Methods inherited from interface java.util.Set

    add, addAll, clear, contains, containsAll, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArray
  • Method Details

    • remove

      public boolean remove​(java.lang.Object ok)
      Specified by:
      remove in interface java.util.Collection<K>
      Specified by:
      remove in interface java.util.Set<K>
      Overrides:
      remove in class java.util.AbstractCollection<K>
    • clone

      public java.lang.Object clone()
    • equals

      public boolean equals​(java.lang.Object o)
      Specified by:
      equals in interface java.util.Collection<K>
      Specified by:
      equals in interface java.util.Set<K>
      Overrides:
      equals in class ObjectCollections.EmptyCollection<K>