Package com.carrotsearch.hppc
Interface FloatCollection
- All Superinterfaces:
FloatContainer
,Iterable<FloatCursor>
- All Known Subinterfaces:
FloatDeque
,FloatIndexedContainer
,FloatSet
- All Known Implementing Classes:
AbstractFloatCollection
,ByteFloatHashMap.ValuesContainer
,CharFloatHashMap.ValuesContainer
,DoubleFloatHashMap.ValuesContainer
,FloatArrayDeque
,FloatArrayList
,FloatByteHashMap.KeysContainer
,FloatCharHashMap.KeysContainer
,FloatDoubleHashMap.KeysContainer
,FloatFloatHashMap.KeysContainer
,FloatFloatHashMap.ValuesContainer
,FloatHashSet
,FloatIntHashMap.KeysContainer
,FloatLongHashMap.KeysContainer
,FloatObjectHashMap.KeysContainer
,FloatScatterSet
,FloatShortHashMap.KeysContainer
,FloatStack
,IntFloatHashMap.ValuesContainer
,LongFloatHashMap.ValuesContainer
,ObjectFloatHashMap.ValuesContainer
,ShortFloatHashMap.ValuesContainer
@Generated(date="2024-02-21T10:44:44+0000",
value="KTypeCollection.java")
public interface FloatCollection
extends FloatContainer
A collection allows basic, efficient operations on sets of elements
(difference and intersection).
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all elements from this collection.void
release()
Removes all elements from the collection and additionally releases any internal buffers.int
removeAll
(float e) Removes all occurrences ofe
from this collection.int
Removes all elements in this collection that are present inc
.int
removeAll
(FloatPredicate predicate) Removes all elements in this collection for which the given predicate returnstrue
.int
Keeps all elements in this collection that are present inc
.int
retainAll
(FloatPredicate predicate) Keeps all elements in this collection for which the given predicate returnstrue
.Methods inherited from interface com.carrotsearch.hppc.FloatContainer
contains, forEach, isEmpty, iterator, size, toArray
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
removeAll
int removeAll(float 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
Removes all elements in this collection that are present inc
.- Returns:
- Returns the number of removed elements.
-
removeAll
Removes all elements in this collection for which the given predicate returnstrue
.- Returns:
- Returns the number of removed elements.
-
retainAll
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
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
void release()Removes all elements from the collection and additionally releases any internal buffers. Typically, if the object is to be reused, a simpleclear()
should be a better alternative since it'll avoid reallocation.- See Also:
-