Package com.carrotsearch.hppc
Class AbstractObjectCollection<KType>
java.lang.Object
com.carrotsearch.hppc.AbstractObjectCollection<KType>
- All Implemented Interfaces:
ObjectCollection<KType>
,ObjectContainer<KType>
,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="2023-10-26T04:33:09+0000",
value="AbstractKTypeCollection.java")
abstract class AbstractObjectCollection<KType>
extends Object
implements ObjectCollection<KType>
Common superclass for collections.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
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.Object[]
toArray()
Default implementation of copying to an array.<T> T[]
Copies all elements of this container to a dynamically created array of the given component type.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 java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.carrotsearch.hppc.ObjectCollection
clear, release, removeAll, removeAll
-
Constructor Details
-
AbstractObjectCollection
AbstractObjectCollection()
-
-
Method Details
-
removeAll
Default implementation uses a predicate for removal.- Specified by:
removeAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
retainAll
Default implementation uses a predicate for retaining.- Specified by:
retainAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
retainAll
Default implementation redirects toObjectCollection.removeAll(ObjectPredicate)
and negates the predicate.- Specified by:
retainAll
in interfaceObjectCollection<KType>
- Returns:
- Returns the number of removed elements.
-
toArray
Default implementation of copying to an array.- Specified by:
toArray
in interfaceObjectContainer<KType>
-
toArray
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
Convert the contents of this container to a human-friendly string. -
equals
-