Package org.agrona.collections
Class Long2ObjectHashMap.EntrySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.util.Map.Entry<java.lang.Long,V>>
-
- org.agrona.collections.Long2ObjectHashMap.EntrySet
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<java.lang.Long,V>>
,java.util.Collection<java.util.Map.Entry<java.lang.Long,V>>
,java.util.Set<java.util.Map.Entry<java.lang.Long,V>>
- Enclosing class:
- Long2ObjectHashMap<V>
public final class Long2ObjectHashMap.EntrySet extends java.util.AbstractSet<java.util.Map.Entry<java.lang.Long,V>>
Set of entries which supports access via an optionally cached iterator to avoid allocation.
-
-
Field Summary
Fields Modifier and Type Field Description private Long2ObjectHashMap.EntryIterator
entryIterator
-
Constructor Summary
Constructors Constructor Description EntrySet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
contains(java.lang.Object o)
Long2ObjectHashMap.EntryIterator
iterator()
boolean
removeIfLong(LongObjPredicate<V> filter)
Removes all the elements of this collection that satisfy the given predicate.int
size()
java.lang.Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmpty, remove, retainAll, toString
-
-
-
-
Field Detail
-
entryIterator
private final Long2ObjectHashMap.EntryIterator entryIterator
-
-
Method Detail
-
iterator
public Long2ObjectHashMap.EntryIterator iterator()
- Specified by:
iterator
in interfacejava.util.Collection<java.util.Map.Entry<java.lang.Long,V>>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.util.Map.Entry<java.lang.Long,V>>
- Specified by:
iterator
in interfacejava.util.Set<java.util.Map.Entry<java.lang.Long,V>>
- Specified by:
iterator
in classjava.util.AbstractCollection<java.util.Map.Entry<java.lang.Long,V>>
-
size
public int size()
-
clear
public void clear()
-
contains
public boolean contains(java.lang.Object o)
-
removeIfLong
public boolean removeIfLong(LongObjPredicate<V> filter)
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:
true
if at least one key was removed.
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
-