public interface LongPairSet
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LongPairSet.LongPairFunction<T>
Represents a function that accepts two long arguments and produces a result.
|
static interface |
LongPairSet.LongPairPredicate
Predicate to checks for a key-value pair where both of them have long types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long item1,
long item2)
Adds composite value of item1 and item2 to set.
|
void |
clear()
Removes all items from set.
|
boolean |
contains(long item1,
long item2)
Checks if given (item1,item2) composite value exists into set.
|
void |
forEach(ConcurrentLongPairSet.LongPairConsumer processor)
Execute
ConcurrentLongPairSet.LongPairConsumer processor for each entry in the set. |
boolean |
isEmpty()
Check if set is empty.
|
Set<ConcurrentLongPairSet.LongPair> |
items() |
Set<ConcurrentLongPairSet.LongPair> |
items(int numberOfItems) |
<T> Set<T> |
items(int numberOfItems,
LongPairSet.LongPairFunction<T> longPairConverter) |
boolean |
remove(long item1,
long item2)
Removes composite value of item1 and item2 from set.
|
int |
removeIf(LongPairSet.LongPairPredicate filter)
Removes composite value of item1 and item2 from set if provided predicate
LongPairSet.LongPairPredicate matches. |
long |
size()
Returns size of the set.
|
boolean add(long item1,
long item2)
item1 - item2 - boolean remove(long item1,
long item2)
item1 - item2 - int removeIf(LongPairSet.LongPairPredicate filter)
LongPairSet.LongPairPredicate matches.filter - void forEach(ConcurrentLongPairSet.LongPairConsumer processor)
ConcurrentLongPairSet.LongPairConsumer processor for each entry in the set.processor - Set<ConcurrentLongPairSet.LongPair> items()
Set<ConcurrentLongPairSet.LongPair> items(int numberOfItems)
<T> Set<T> items(int numberOfItems, LongPairSet.LongPairFunction<T> longPairConverter)
numberOfItems - longPairConverter - converts (long,long) pair to boolean isEmpty()
void clear()
long size()
boolean contains(long item1,
long item2)
item1 - item2 - Copyright © 2017–2022 Apache Software Foundation. All rights reserved.