Package com.carrotsearch.hppc
Interface ShortCollection
-
- All Superinterfaces:
java.lang.Iterable<ShortCursor>,ShortContainer
- All Known Subinterfaces:
ShortDeque,ShortIndexedContainer,ShortSet
- All Known Implementing Classes:
AbstractShortCollection,ByteShortHashMap.ValuesContainer,CharShortHashMap.ValuesContainer,DoubleShortHashMap.ValuesContainer,FloatShortHashMap.ValuesContainer,IntShortHashMap.ValuesContainer,LongShortHashMap.ValuesContainer,ObjectShortHashMap.ValuesContainer,ShortArrayDeque,ShortArrayList,ShortByteHashMap.KeysContainer,ShortCharHashMap.KeysContainer,ShortDoubleHashMap.KeysContainer,ShortFloatHashMap.KeysContainer,ShortHashSet,ShortIntHashMap.KeysContainer,ShortLongHashMap.KeysContainer,ShortObjectHashMap.KeysContainer,ShortScatterSet,ShortShortHashMap.KeysContainer,ShortShortHashMap.ValuesContainer,ShortStack
@Generated(date="2024-05-16T12:00:00+0000", value="KTypeCollection.java") public interface ShortCollection extends ShortContainerA 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 voidclear()Removes all elements from this collection.voidrelease()Removes all elements from the collection and additionally releases any internal buffers.intremoveAll(short e)Removes all occurrences ofefrom this collection.intremoveAll(ShortPredicate predicate)Removes all elements in this collection for which the given predicate returnstrue.intremoveAll(ShortLookupContainer c)Removes all elements in this collection that are present inc.intretainAll(ShortPredicate predicate)Keeps all elements in this collection for which the given predicate returnstrue.intretainAll(ShortLookupContainer c)Keeps all elements in this collection that are present inc.
-
-
-
Method Detail
-
removeAll
int removeAll(short e)
Removes all occurrences ofefrom 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(ShortLookupContainer c)
Removes all elements in this collection that are present inc.- Returns:
- Returns the number of removed elements.
-
removeAll
int removeAll(ShortPredicate predicate)
Removes all elements in this collection for which the given predicate returnstrue.- Returns:
- Returns the number of removed elements.
-
retainAll
int retainAll(ShortLookupContainer 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(ShortPredicate 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()
-
-