Interface ObjectCollection<K>

All Superinterfaces:
Collection<K>, Iterable<K>, ObjectIterable<K>
All Known Subinterfaces:
Byte2BooleanMap.FastEntrySet, Byte2BooleanSortedMap.FastSortedEntrySet, Byte2ByteMap.FastEntrySet, Byte2ByteSortedMap.FastSortedEntrySet, Byte2CharMap.FastEntrySet, Byte2CharSortedMap.FastSortedEntrySet, Byte2DoubleMap.FastEntrySet, Byte2DoubleSortedMap.FastSortedEntrySet, Byte2FloatMap.FastEntrySet, Byte2FloatSortedMap.FastSortedEntrySet, Byte2IntMap.FastEntrySet, Byte2IntSortedMap.FastSortedEntrySet, Byte2LongMap.FastEntrySet, Byte2LongSortedMap.FastSortedEntrySet, Byte2ObjectMap.FastEntrySet<V>, Byte2ObjectSortedMap.FastSortedEntrySet<V>, Byte2ReferenceMap.FastEntrySet<V>, Byte2ReferenceSortedMap.FastSortedEntrySet<V>, Byte2ShortMap.FastEntrySet, Byte2ShortSortedMap.FastSortedEntrySet, Char2BooleanMap.FastEntrySet, Char2BooleanSortedMap.FastSortedEntrySet, Char2ByteMap.FastEntrySet, Char2ByteSortedMap.FastSortedEntrySet, Char2CharMap.FastEntrySet, Char2CharSortedMap.FastSortedEntrySet, Char2DoubleMap.FastEntrySet, Char2DoubleSortedMap.FastSortedEntrySet, Char2FloatMap.FastEntrySet, Char2FloatSortedMap.FastSortedEntrySet, Char2IntMap.FastEntrySet, Char2IntSortedMap.FastSortedEntrySet, Char2LongMap.FastEntrySet, Char2LongSortedMap.FastSortedEntrySet, Char2ObjectMap.FastEntrySet<V>, Char2ObjectSortedMap.FastSortedEntrySet<V>, Char2ReferenceMap.FastEntrySet<V>, Char2ReferenceSortedMap.FastSortedEntrySet<V>, Char2ShortMap.FastEntrySet, Char2ShortSortedMap.FastSortedEntrySet, Double2BooleanMap.FastEntrySet, Double2BooleanSortedMap.FastSortedEntrySet, Double2ByteMap.FastEntrySet, Double2ByteSortedMap.FastSortedEntrySet, Double2CharMap.FastEntrySet, Double2CharSortedMap.FastSortedEntrySet, Double2DoubleMap.FastEntrySet, Double2DoubleSortedMap.FastSortedEntrySet, Double2FloatMap.FastEntrySet, Double2FloatSortedMap.FastSortedEntrySet, Double2IntMap.FastEntrySet, Double2IntSortedMap.FastSortedEntrySet, Double2LongMap.FastEntrySet, Double2LongSortedMap.FastSortedEntrySet, Double2ObjectMap.FastEntrySet<V>, Double2ObjectSortedMap.FastSortedEntrySet<V>, Double2ReferenceMap.FastEntrySet<V>, Double2ReferenceSortedMap.FastSortedEntrySet<V>, Double2ShortMap.FastEntrySet, Double2ShortSortedMap.FastSortedEntrySet, Float2BooleanMap.FastEntrySet, Float2BooleanSortedMap.FastSortedEntrySet, Float2ByteMap.FastEntrySet, Float2ByteSortedMap.FastSortedEntrySet, Float2CharMap.FastEntrySet, Float2CharSortedMap.FastSortedEntrySet, Float2DoubleMap.FastEntrySet, Float2DoubleSortedMap.FastSortedEntrySet, Float2FloatMap.FastEntrySet, Float2FloatSortedMap.FastSortedEntrySet, Float2IntMap.FastEntrySet, Float2IntSortedMap.FastSortedEntrySet, Float2LongMap.FastEntrySet, Float2LongSortedMap.FastSortedEntrySet, Float2ObjectMap.FastEntrySet<V>, Float2ObjectSortedMap.FastSortedEntrySet<V>, Float2ReferenceMap.FastEntrySet<V>, Float2ReferenceSortedMap.FastSortedEntrySet<V>, Float2ShortMap.FastEntrySet, Float2ShortSortedMap.FastSortedEntrySet, Int2BooleanMap.FastEntrySet, Int2BooleanSortedMap.FastSortedEntrySet, Int2ByteMap.FastEntrySet, Int2ByteSortedMap.FastSortedEntrySet, Int2CharMap.FastEntrySet, Int2CharSortedMap.FastSortedEntrySet, Int2DoubleMap.FastEntrySet, Int2DoubleSortedMap.FastSortedEntrySet, Int2FloatMap.FastEntrySet, Int2FloatSortedMap.FastSortedEntrySet, Int2IntMap.FastEntrySet, Int2IntSortedMap.FastSortedEntrySet, Int2LongMap.FastEntrySet, Int2LongSortedMap.FastSortedEntrySet, Int2ObjectMap.FastEntrySet<V>, Int2ObjectSortedMap.FastSortedEntrySet<V>, Int2ReferenceMap.FastEntrySet<V>, Int2ReferenceSortedMap.FastSortedEntrySet<V>, Int2ShortMap.FastEntrySet, Int2ShortSortedMap.FastSortedEntrySet, Long2BooleanMap.FastEntrySet, Long2BooleanSortedMap.FastSortedEntrySet, Long2ByteMap.FastEntrySet, Long2ByteSortedMap.FastSortedEntrySet, Long2CharMap.FastEntrySet, Long2CharSortedMap.FastSortedEntrySet, Long2DoubleMap.FastEntrySet, Long2DoubleSortedMap.FastSortedEntrySet, Long2FloatMap.FastEntrySet, Long2FloatSortedMap.FastSortedEntrySet, Long2IntMap.FastEntrySet, Long2IntSortedMap.FastSortedEntrySet, Long2LongMap.FastEntrySet, Long2LongSortedMap.FastSortedEntrySet, Long2ObjectMap.FastEntrySet<V>, Long2ObjectSortedMap.FastSortedEntrySet<V>, Long2ReferenceMap.FastEntrySet<V>, Long2ReferenceSortedMap.FastSortedEntrySet<V>, Long2ShortMap.FastEntrySet, Long2ShortSortedMap.FastSortedEntrySet, Object2BooleanMap.FastEntrySet<K>, Object2BooleanSortedMap.FastSortedEntrySet<K>, Object2ByteMap.FastEntrySet<K>, Object2ByteSortedMap.FastSortedEntrySet<K>, Object2CharMap.FastEntrySet<K>, Object2CharSortedMap.FastSortedEntrySet<K>, Object2DoubleMap.FastEntrySet<K>, Object2DoubleSortedMap.FastSortedEntrySet<K>, Object2FloatMap.FastEntrySet<K>, Object2FloatSortedMap.FastSortedEntrySet<K>, Object2IntMap.FastEntrySet<K>, Object2IntSortedMap.FastSortedEntrySet<K>, Object2LongMap.FastEntrySet<K>, Object2LongSortedMap.FastSortedEntrySet<K>, Object2ObjectMap.FastEntrySet<K,V>, Object2ObjectSortedMap.FastSortedEntrySet<K,V>, Object2ReferenceMap.FastEntrySet<K,V>, Object2ReferenceSortedMap.FastSortedEntrySet<K,V>, Object2ShortMap.FastEntrySet<K>, Object2ShortSortedMap.FastSortedEntrySet<K>, ObjectBigList<K>, ObjectList<K>, ObjectSet<K>, ObjectSortedSet<K>, Reference2BooleanMap.FastEntrySet<K>, Reference2BooleanSortedMap.FastSortedEntrySet<K>, Reference2ByteMap.FastEntrySet<K>, Reference2ByteSortedMap.FastSortedEntrySet<K>, Reference2CharMap.FastEntrySet<K>, Reference2CharSortedMap.FastSortedEntrySet<K>, Reference2DoubleMap.FastEntrySet<K>, Reference2DoubleSortedMap.FastSortedEntrySet<K>, Reference2FloatMap.FastEntrySet<K>, Reference2FloatSortedMap.FastSortedEntrySet<K>, Reference2IntMap.FastEntrySet<K>, Reference2IntSortedMap.FastSortedEntrySet<K>, Reference2LongMap.FastEntrySet<K>, Reference2LongSortedMap.FastSortedEntrySet<K>, Reference2ObjectMap.FastEntrySet<K,V>, Reference2ObjectSortedMap.FastSortedEntrySet<K,V>, Reference2ReferenceMap.FastEntrySet<K,V>, Reference2ReferenceSortedMap.FastSortedEntrySet<K,V>, Reference2ShortMap.FastEntrySet<K>, Reference2ShortSortedMap.FastSortedEntrySet<K>, Short2BooleanMap.FastEntrySet, Short2BooleanSortedMap.FastSortedEntrySet, Short2ByteMap.FastEntrySet, Short2ByteSortedMap.FastSortedEntrySet, Short2CharMap.FastEntrySet, Short2CharSortedMap.FastSortedEntrySet, Short2DoubleMap.FastEntrySet, Short2DoubleSortedMap.FastSortedEntrySet, Short2FloatMap.FastEntrySet, Short2FloatSortedMap.FastSortedEntrySet, Short2IntMap.FastEntrySet, Short2IntSortedMap.FastSortedEntrySet, Short2LongMap.FastEntrySet, Short2LongSortedMap.FastSortedEntrySet, Short2ObjectMap.FastEntrySet<V>, Short2ObjectSortedMap.FastSortedEntrySet<V>, Short2ReferenceMap.FastEntrySet<V>, Short2ReferenceSortedMap.FastSortedEntrySet<V>, Short2ShortMap.FastEntrySet, Short2ShortSortedMap.FastSortedEntrySet
All Known Implementing Classes:
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, AbstractObjectBigList, AbstractObjectBigList.ObjectRandomAccessSubList, AbstractObjectBigList.ObjectSubList, AbstractObjectCollection, AbstractObjectList, AbstractObjectList.ObjectRandomAccessSubList, AbstractObjectList.ObjectSubList, AbstractObjectSet, 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, ByteArrayFrontCodedBigList, ByteArrayFrontCodedList, CharArrayFrontCodedBigList, CharArrayFrontCodedList, IntArrayFrontCodedBigList, IntArrayFrontCodedList, LongArrayFrontCodedBigList, LongArrayFrontCodedList, ObjectArrayList, ObjectArraySet, ObjectAVLTreeSet, ObjectBigArrayBigList, ObjectBigLists.EmptyBigList, ObjectBigLists.ListBigList, ObjectBigLists.Singleton, ObjectBigLists.SynchronizedBigList, ObjectBigLists.UnmodifiableBigList, ObjectCollections.EmptyCollection, ObjectCollections.IterableCollection, ObjectImmutableList, ObjectLinkedOpenCustomHashSet, ObjectLinkedOpenHashSet, ObjectLists.EmptyList, ObjectLists.Singleton, ObjectLists.SynchronizedList, ObjectLists.SynchronizedRandomAccessList, ObjectLists.UnmodifiableList, ObjectLists.UnmodifiableRandomAccessList, ObjectOpenCustomHashSet, ObjectOpenHashBigSet, ObjectOpenHashSet, ObjectRBTreeSet, ObjectSets.EmptySet, ObjectSets.Singleton, ObjectSets.SynchronizedSet, ObjectSets.UnmodifiableSet, ObjectSortedSets.EmptySet, ObjectSortedSets.Singleton, ObjectSortedSets.SynchronizedSortedSet, ObjectSortedSets.UnmodifiableSortedSet, ShortArrayFrontCodedBigList, ShortArrayFrontCodedList

public interface ObjectCollection<K> extends Collection<K>, ObjectIterable<K>
A type-specific Collection; provides some additional methods that use polymorphism to avoid (un)boxing.

Additionally, this class defines strengthens (again) iterator().

This interface specifies reference equality semantics (members will be compared equal with == instead of equals), which may result in breaks in contract if attempted to be used with non reference-equality semantics based Collections. For example, a aReferenceCollection.equals(aObjectCollection) may return different a different result then aObjectCollection.equals(aReferenceCollection), in violation of equals's contract requiring it being symmetric.

See Also:
  • Method Details

    • iterator

      ObjectIterator<K> iterator()
      Returns a type-specific iterator on the elements of this collection.
      Specified by:
      iterator in interface Collection<K>
      Specified by:
      iterator in interface Iterable<K>
      Specified by:
      iterator in interface ObjectIterable<K>
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
      API Notes:
      This specification strengthens the one given in Iterable.iterator(), which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extends Collection.
    • spliterator

      default ObjectSpliterator<K> spliterator()
      Returns a type-specific spliterator on the elements of this collection.

      See Collection.spliterator() for more documentation on the requirements of the returned spliterator.

      Specified by:
      spliterator in interface Collection<K>
      Specified by:
      spliterator in interface Iterable<K>
      Specified by:
      spliterator in interface ObjectIterable<K>
      Returns:
      a type-specific spliterator on the elements of this collection.
      Since:
      8.5.0
      API Notes:
      This specification strengthens the one given in Collection.spliterator().

      Also, this is generally the only spliterator method subclasses should override.

      Implementation Specification:
      The default implementation returns a late-binding spliterator (see Spliterator for documentation on what binding policies mean) that wraps this instance's type specific iterator().

      Additionally, it reports Spliterator.SIZED

      Implementation Notes:
      As this default implementation wraps the iterator, and Iterator is an inherently linear API, the returned spliterator will yield limited performance gains when run in parallel contexts, as the returned spliterator's trySplit() will have linear runtime.