Package com.carrotsearch.hppc
Interface ObjectCollection<KType>
-
- All Superinterfaces:
java.lang.Iterable<ObjectCursor<KType>>
,ObjectContainer<KType>
- All Known Subinterfaces:
ObjectDeque<KType>
,ObjectIndexedContainer<KType>
,ObjectSet<KType>
- All Known Implementing Classes:
ObjectArrayDeque
,ObjectArrayList
,ObjectByteHashMap.KeysContainer
,ObjectCharHashMap.KeysContainer
,ObjectDoubleHashMap.KeysContainer
,ObjectFloatHashMap.KeysContainer
,ObjectHashSet
,ObjectIdentityHashSet
,ObjectIntHashMap.KeysContainer
,ObjectLongHashMap.KeysContainer
,ObjectObjectHashMap.KeysContainer
,ObjectScatterSet
,ObjectShortHashMap.KeysContainer
,ObjectStack
@Generated(date="2021-05-28T03:45:41+0000", value="KTypeCollection.java") public interface ObjectCollection<KType> extends ObjectContainer<KType>
A collection allows basic, efficient operations on sets of elements (difference and intersection).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Removes all elements from this collection.void
release()
Removes all elements from the collection and additionally releases any internal buffers.int
removeAll(ObjectLookupContainer<? super KType> c)
Removes all elements in this collection that are present inc
.int
removeAll(ObjectPredicate<? super KType> predicate)
Removes all elements in this collection for which the given predicate returnstrue
.int
removeAll(KType e)
Removes all occurrences ofe
from this collection.int
retainAll(ObjectLookupContainer<? super KType> c)
Keeps all elements in this collection that are present inc
.int
retainAll(ObjectPredicate<? super KType> predicate)
Keeps all elements in this collection for which the given predicate returnstrue
.
-
-
-
Method Detail
-
removeAll
int removeAll(KType e)
Removes all occurrences ofe
from this collection.- Parameters:
e
- Element to be removed from this collection, if present.- Returns:
- The number of removed elements as a result of this call.
-
removeAll
int removeAll(ObjectLookupContainer<? super KType> c)
Removes all elements in this collection that are present inc
.- Returns:
- Returns the number of removed elements.
-
removeAll
int removeAll(ObjectPredicate<? super KType> predicate)
Removes all elements in this collection for which the given predicate returnstrue
.- Returns:
- Returns the number of removed elements.
-
retainAll
int retainAll(ObjectLookupContainer<? super KType> c)
Keeps all elements in this collection that are present inc
. Runs in time proportional to the number of elements in this collection. Equivalent of sets intersection.- Returns:
- Returns the number of removed elements.
-
retainAll
int retainAll(ObjectPredicate<? super KType> predicate)
Keeps all elements in this collection for which the given predicate returnstrue
.- Returns:
- Returns the number of removed elements.
-
clear
void clear()
Removes all elements from this collection.- See Also:
release()
-
-