Package org.agrona.collections
Class Object2LongHashMap.ValueCollection
- All Implemented Interfaces:
Iterable<Long>
,Collection<Long>
- Enclosing class:
Object2LongHashMap<K>
Collection of values which can optionally cache iterators to avoid allocation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
contains
(long value) Checks if the value is contained in the map.boolean
iterator()
boolean
removeIfLong
(LongPredicate filter) Removes all the elements of this collection that satisfy the given predicate.int
size()
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
valueIterator
-
-
Constructor Details
-
ValueCollection
public ValueCollection()
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceCollection<Long>
- Specified by:
iterator
in interfaceIterable<Long>
- Specified by:
iterator
in classAbstractCollection<Long>
-
size
public int size()- Specified by:
size
in interfaceCollection<Long>
- Specified by:
size
in classAbstractCollection<Long>
-
contains
- Specified by:
contains
in interfaceCollection<Long>
- Overrides:
contains
in classAbstractCollection<Long>
-
contains
public boolean contains(long value) Checks if the value is contained in the map.- Parameters:
value
- to be checked.- Returns:
true
if value is contained in this map.
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Long>
- Overrides:
clear
in classAbstractCollection<Long>
-
removeIfLong
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.
-