Package org.agrona.collections
Class Object2LongHashMap.EntrySet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<java.util.Map.Entry<K,java.lang.Long>>
-
- org.agrona.collections.Object2LongHashMap.EntrySet
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,java.lang.Long>>
,java.util.Collection<java.util.Map.Entry<K,java.lang.Long>>
,java.util.Set<java.util.Map.Entry<K,java.lang.Long>>
- Enclosing class:
- Object2LongHashMap<K>
public final class Object2LongHashMap.EntrySet extends java.util.AbstractSet<java.util.Map.Entry<K,java.lang.Long>>
Set of entries which can optionally cache iterators to avoid allocation.
-
-
Field Summary
Fields Modifier and Type Field Description private Object2LongHashMap.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)
Object2LongHashMap.EntryIterator
iterator()
boolean
removeIfLong(ObjLongPredicate<? super K> 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 Object2LongHashMap.EntryIterator entryIterator
-
-
Method Detail
-
iterator
public Object2LongHashMap.EntryIterator iterator()
- Specified by:
iterator
in interfacejava.util.Collection<java.util.Map.Entry<K,java.lang.Long>>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.util.Map.Entry<K,java.lang.Long>>
- Specified by:
iterator
in interfacejava.util.Set<java.util.Map.Entry<K,java.lang.Long>>
- Specified by:
iterator
in classjava.util.AbstractCollection<java.util.Map.Entry<K,java.lang.Long>>
-
size
public int size()
-
clear
public void clear()
-
contains
public boolean contains(java.lang.Object o)
-
removeIfLong
public boolean removeIfLong(ObjLongPredicate<? super K> filter)
Removes all the elements of this collection that satisfy the given predicate.- Parameters:
filter
- a predicate which returnstrue
for elements to be removed.- Returns:
true
if any elements were removed.
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
-