Package com.carrotsearch.hppc
Class AbstractObjectCollection<KType>
- java.lang.Object
-
- com.carrotsearch.hppc.AbstractObjectCollection<KType>
-
- All Implemented Interfaces:
ObjectCollection<KType>
,ObjectContainer<KType>
,java.lang.Iterable<ObjectCursor<KType>>
- Direct Known Subclasses:
ByteObjectHashMap.ValuesContainer
,CharObjectHashMap.ValuesContainer
,DoubleObjectHashMap.ValuesContainer
,FloatObjectHashMap.ValuesContainer
,IntObjectHashMap.ValuesContainer
,LongObjectHashMap.ValuesContainer
,ObjectArrayDeque
,ObjectArrayList
,ObjectByteHashMap.KeysContainer
,ObjectCharHashMap.KeysContainer
,ObjectDoubleHashMap.KeysContainer
,ObjectFloatHashMap.KeysContainer
,ObjectHashSet
,ObjectIntHashMap.KeysContainer
,ObjectLongHashMap.KeysContainer
,ObjectObjectHashMap.KeysContainer
,ObjectObjectHashMap.ValuesContainer
,ObjectShortHashMap.KeysContainer
,ShortObjectHashMap.ValuesContainer
@Generated(date="2024-05-16T12:00:00+0000", value="AbstractKTypeCollection.java") abstract class AbstractObjectCollection<KType> extends java.lang.Object implements ObjectCollection<KType>
Common superclass for collections.
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equals(java.lang.Object v1, java.lang.Object v2)
int
removeAll(ObjectLookupContainer<? super KType> c)
Default implementation uses a predicate for removal.int
retainAll(ObjectLookupContainer<? super KType> c)
Default implementation uses a predicate for retaining.int
retainAll(ObjectPredicate<? super KType> predicate)
Default implementation redirects toObjectCollection.removeAll(ObjectPredicate)
and negates the predicate.java.lang.Object[]
toArray()
Default implementation of copying to an array.<T> T[]
toArray(java.lang.Class<T> componentClass)
Copies all elements of this container to a dynamically created array of the given component type.java.lang.String
toString()
Convert the contents of this container to a human-friendly string.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.carrotsearch.hppc.ObjectCollection
clear, release, removeAll, removeAll
-
-
-
-
Method Detail
-
removeAll
public int removeAll(ObjectLookupContainer<? super KType> c)
Default implementation uses a predicate for removal.- Specified by:
removeAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(ObjectLookupContainer<? super KType> c)
Default implementation uses a predicate for retaining.- Specified by:
retainAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
retainAll
public int retainAll(ObjectPredicate<? super KType> predicate)
Default implementation redirects toObjectCollection.removeAll(ObjectPredicate)
and negates the predicate.- Specified by:
retainAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
toArray
public java.lang.Object[] toArray()
Default implementation of copying to an array.- Specified by:
toArray
in interfaceObjectContainer<KType>
-
toArray
public <T> T[] toArray(java.lang.Class<T> componentClass)
Description copied from interface:ObjectContainer
Copies all elements of this container to a dynamically created array of the given component type.- Specified by:
toArray
in interfaceObjectContainer<KType>
-
toString
public java.lang.String toString()
Convert the contents of this container to a human-friendly string.- Overrides:
toString
in classjava.lang.Object
-
equals
protected boolean equals(java.lang.Object v1, java.lang.Object v2)
-
-