- Type Parameters:
E
- the type of the keys/elements in the collection
- All Known Subinterfaces:
FastTripleBunch
,JenaMap<K,
,V> JenaSet<E>
,JenaSetHashOptimized<E>
,NodeToTriplesMap
,TripleBunch
- All Known Implementing Classes:
ArrayBunch
,FastArrayBunch
,FastHashBase
,FastHashedBunchMap
,FastHashedTripleBunch
,FastHashMap
,FastHashSet
,HashCommonMap
,HashCommonSet
,HashedBunchMap
,HashedTripleBunch
,NodeToTriplesMapMem
public interface JenaMapSetCommon<E>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether the collection contains any element matching the predicate.void
clear()
Clear the collection.boolean
containsKey
(E key) Check whether the collection contains a given key.boolean
isEmpty()
Get an iterator over the keys in the collection.Get a spliterator over the keys in the collection.Get a stream over the keys in the collection.Get a parallel stream over the keys in the collection.void
removeUnchecked
(E key) Removes a key from the collection.int
size()
boolean
Tries to remove a key from the collection.
-
Method Details
-
clear
void clear()Clear the collection. -
size
int size()- Returns:
- the number of elements in the collection
-
isEmpty
boolean isEmpty()- Returns:
- true if the collection is empty
-
containsKey
Check whether the collection contains a given key.- Parameters:
key
- the key to look for- Returns:
- true if the collection contains the key
-
anyMatch
Check whether the collection contains any element matching the predicate.- Parameters:
predicate
- the predicate to match- Returns:
- true if the collection contains any element matching the predicate
-
tryRemove
Tries to remove a key from the collection.- Parameters:
key
- the key to remove- Returns:
- true if the key was removed. If the key was not present, false is returned.
-
removeUnchecked
Removes a key from the collection. Attention: Implementations may assume that the key is present.- Parameters:
key
- the key to remove
-
keyIterator
ExtendedIterator<E> keyIterator()Get an iterator over the keys in the collection.- Returns:
- an iterator over the keys in the collection
-
keySpliterator
Spliterator<E> keySpliterator()Get a spliterator over the keys in the collection.- Returns:
- a spliterator over the keys in the collection
-
keyStream
Get a stream over the keys in the collection.- Returns:
- a stream over the keys in the collection
-
keyStreamParallel
Get a parallel stream over the keys in the collection.- Returns:
- a parallel stream over the keys in the collection
-