Class AbstractObjectSet<K>

java.lang.Object
java.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectSet<K>
All Implemented Interfaces:
ObjectCollection<K>, ObjectIterable<K>, ObjectSet<K>, java.lang.Cloneable, java.lang.Iterable<K>, java.util.Collection<K>, java.util.Set<K>
Direct Known Subclasses:
AbstractByte2BooleanMap.BasicEntrySet, AbstractByte2ByteMap.BasicEntrySet, AbstractByte2CharMap.BasicEntrySet, AbstractByte2DoubleMap.BasicEntrySet, AbstractByte2FloatMap.BasicEntrySet, AbstractByte2IntMap.BasicEntrySet, AbstractByte2LongMap.BasicEntrySet, AbstractByte2ObjectMap.BasicEntrySet, AbstractByte2ReferenceMap.BasicEntrySet, AbstractByte2ShortMap.BasicEntrySet, AbstractChar2BooleanMap.BasicEntrySet, AbstractChar2ByteMap.BasicEntrySet, AbstractChar2CharMap.BasicEntrySet, AbstractChar2DoubleMap.BasicEntrySet, AbstractChar2FloatMap.BasicEntrySet, AbstractChar2IntMap.BasicEntrySet, AbstractChar2LongMap.BasicEntrySet, AbstractChar2ObjectMap.BasicEntrySet, AbstractChar2ReferenceMap.BasicEntrySet, AbstractChar2ShortMap.BasicEntrySet, AbstractDouble2BooleanMap.BasicEntrySet, AbstractDouble2ByteMap.BasicEntrySet, AbstractDouble2CharMap.BasicEntrySet, AbstractDouble2DoubleMap.BasicEntrySet, AbstractDouble2FloatMap.BasicEntrySet, AbstractDouble2IntMap.BasicEntrySet, AbstractDouble2LongMap.BasicEntrySet, AbstractDouble2ObjectMap.BasicEntrySet, AbstractDouble2ReferenceMap.BasicEntrySet, AbstractDouble2ShortMap.BasicEntrySet, AbstractFloat2BooleanMap.BasicEntrySet, AbstractFloat2ByteMap.BasicEntrySet, AbstractFloat2CharMap.BasicEntrySet, AbstractFloat2DoubleMap.BasicEntrySet, AbstractFloat2FloatMap.BasicEntrySet, AbstractFloat2IntMap.BasicEntrySet, AbstractFloat2LongMap.BasicEntrySet, AbstractFloat2ObjectMap.BasicEntrySet, AbstractFloat2ReferenceMap.BasicEntrySet, AbstractFloat2ShortMap.BasicEntrySet, AbstractInt2BooleanMap.BasicEntrySet, AbstractInt2ByteMap.BasicEntrySet, AbstractInt2CharMap.BasicEntrySet, AbstractInt2DoubleMap.BasicEntrySet, AbstractInt2FloatMap.BasicEntrySet, AbstractInt2IntMap.BasicEntrySet, AbstractInt2LongMap.BasicEntrySet, AbstractInt2ObjectMap.BasicEntrySet, AbstractInt2ReferenceMap.BasicEntrySet, AbstractInt2ShortMap.BasicEntrySet, AbstractLong2BooleanMap.BasicEntrySet, AbstractLong2ByteMap.BasicEntrySet, AbstractLong2CharMap.BasicEntrySet, AbstractLong2DoubleMap.BasicEntrySet, AbstractLong2FloatMap.BasicEntrySet, AbstractLong2IntMap.BasicEntrySet, AbstractLong2LongMap.BasicEntrySet, AbstractLong2ObjectMap.BasicEntrySet, AbstractLong2ReferenceMap.BasicEntrySet, AbstractLong2ShortMap.BasicEntrySet, AbstractObject2BooleanMap.BasicEntrySet, AbstractObject2ByteMap.BasicEntrySet, AbstractObject2CharMap.BasicEntrySet, AbstractObject2DoubleMap.BasicEntrySet, AbstractObject2FloatMap.BasicEntrySet, AbstractObject2IntMap.BasicEntrySet, AbstractObject2LongMap.BasicEntrySet, AbstractObject2ObjectMap.BasicEntrySet, AbstractObject2ReferenceMap.BasicEntrySet, AbstractObject2ShortMap.BasicEntrySet, AbstractObjectSortedSet, AbstractReference2BooleanMap.BasicEntrySet, AbstractReference2ByteMap.BasicEntrySet, AbstractReference2CharMap.BasicEntrySet, AbstractReference2DoubleMap.BasicEntrySet, AbstractReference2FloatMap.BasicEntrySet, AbstractReference2IntMap.BasicEntrySet, AbstractReference2LongMap.BasicEntrySet, AbstractReference2ObjectMap.BasicEntrySet, AbstractReference2ReferenceMap.BasicEntrySet, AbstractReference2ShortMap.BasicEntrySet, AbstractShort2BooleanMap.BasicEntrySet, AbstractShort2ByteMap.BasicEntrySet, AbstractShort2CharMap.BasicEntrySet, AbstractShort2DoubleMap.BasicEntrySet, AbstractShort2FloatMap.BasicEntrySet, AbstractShort2IntMap.BasicEntrySet, AbstractShort2LongMap.BasicEntrySet, AbstractShort2ObjectMap.BasicEntrySet, AbstractShort2ReferenceMap.BasicEntrySet, AbstractShort2ShortMap.BasicEntrySet, ObjectArraySet, ObjectOpenCustomHashSet, ObjectOpenHashBigSet, ObjectOpenHashSet, ObjectSets.Singleton

public abstract class AbstractObjectSet<K>
extends AbstractObjectCollection<K>
implements java.lang.Cloneable, ObjectSet<K>
An abstract class providing basic methods for sets implementing a type-specific interface.

Note that the type-specific Set interface adds a type-specific remove() method, as it is no longer harmful for subclasses. Thus, concrete subclasses of this class must implement remove() (the rem() implementation of this class just delegates to remove()).

  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    int hashCode()
    Returns a hash code for this set.
    abstract ObjectIterator<K> iterator()
    Returns a type-specific iterator on the elements of this collection.

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

    toString

    Methods inherited from class java.util.AbstractCollection

    add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray

    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

    spliterator

    Methods inherited from interface java.util.Set

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

    • iterator

      public abstract ObjectIterator<K> iterator()
      Description copied from interface: ObjectCollection
      Returns a type-specific iterator on the elements of this collection.
      Specified by:
      iterator in interface java.util.Collection<K>
      Specified by:
      iterator in interface java.lang.Iterable<K>
      Specified by:
      iterator in interface ObjectCollection<K>
      Specified by:
      iterator in interface ObjectIterable<K>
      Specified by:
      iterator in interface ObjectSet<K>
      Specified by:
      iterator in interface java.util.Set<K>
      Specified by:
      iterator in class AbstractObjectCollection<K>
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
      Iterable.iterator()
    • 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 java.lang.Object
    • hashCode

      public int hashCode()
      Returns a hash code for this set. The hash code of a set is computed by summing the hash codes of its elements.
      Specified by:
      hashCode in interface java.util.Collection<K>
      Specified by:
      hashCode in interface java.util.Set<K>
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      a hash code for this set.