Package org.agrona.collections
Class Long2LongHashMap.EntrySet
- All Implemented Interfaces:
Iterable<Map.Entry<Long,,Long>> Collection<Map.Entry<Long,,Long>> Set<Map.Entry<Long,Long>>
- Enclosing class:
- Long2LongHashMap
Set of entries which supports optionally cached iterators to avoid allocation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanbooleanisEmpty()iterator()booleanremoveIfLong(LongLongPredicate filter) Removes all the elements of this collection that satisfy the given predicate.intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, containsAll, remove, retainAll, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
add, addAll, containsAll, remove, retainAll, spliterator
-
Constructor Details
-
EntrySet
public EntrySet()Create a new instance.
-
-
Method Details
-
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
clear
public void clear() -
contains
-
removeIfLong
Removes all the elements of this collection that satisfy the given predicate.NB: Renamed from removeIf to avoid overloading on parameter types of lambda expression, which doesn't play well with type inference in lambda expressions.
- Parameters:
filter- a predicate to apply.- Returns:
trueif at least one entry was removed.
-
toArray
-
toArray
public <T> T[] toArray(T[] a)
-