Package com.carrotsearch.hppc
Interface IntCollection
-
- All Superinterfaces:
IntContainer,Iterable<IntCursor>
- All Known Subinterfaces:
IntIndexedContainer,IntSet
- All Known Implementing Classes:
IntArrayList,IntHashSet,IntObjectHashMap.KeysContainer
@Generated(date="2018-05-21T12:24:05+0200", value="KTypeCollection.java") public interface IntCollection extends IntContainer
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 voidclear()Removes all elements from this collection.voidrelease()Removes all elements from the collection and additionally releases any internal buffers.intremoveAll(int e)Removes all occurrences ofefrom this collection.intremoveAll(IntLookupContainer c)Removes all elements in this collection that are present inc.intremoveAll(IntPredicate predicate)Removes all elements in this collection for which the given predicate returnstrue.intretainAll(IntLookupContainer c)Keeps all elements in this collection that are present inc.intretainAll(IntPredicate predicate)Keeps all elements in this collection for which the given predicate returnstrue.-
Methods inherited from interface com.carrotsearch.hppc.IntContainer
contains, forEach, isEmpty, iterator, size, toArray
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
removeAll
int removeAll(int 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(IntLookupContainer c)
Removes all elements in this collection that are present inc.- Returns:
- Returns the number of removed elements.
-
removeAll
int removeAll(IntPredicate predicate)
Removes all elements in this collection for which the given predicate returnstrue.- Returns:
- Returns the number of removed elements.
-
retainAll
int retainAll(IntLookupContainer 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(IntPredicate 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()
-
-