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 booleanequals(java.lang.Object v1, java.lang.Object v2)intremoveAll(ObjectLookupContainer<? super KType> c)Default implementation uses a predicate for removal.intretainAll(ObjectLookupContainer<? super KType> c)Default implementation uses a predicate for retaining.intretainAll(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.StringtoString()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:
removeAllin 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:
retainAllin 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:
retainAllin interfaceObjectCollection<KType>- Returns:
- Returns the number of removed elements.
-
toArray
public java.lang.Object[] toArray()
Default implementation of copying to an array.- Specified by:
toArrayin interfaceObjectContainer<KType>
-
toArray
public <T> T[] toArray(java.lang.Class<T> componentClass)
Description copied from interface:ObjectContainerCopies all elements of this container to a dynamically created array of the given component type.- Specified by:
toArrayin interfaceObjectContainer<KType>
-
toString
public java.lang.String toString()
Convert the contents of this container to a human-friendly string.- Overrides:
toStringin classjava.lang.Object
-
equals
protected boolean equals(java.lang.Object v1, java.lang.Object v2)
-
-