- 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,NodesToBitmapsMap,NodeToTriplesMapMem,TripleSet
public interface JenaMapSetCommon<E>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck whether the collection contains any element matching the predicate.voidclear()Clear the collection.booleancontainsKey(E key) Check whether the collection contains a given key.booleanisEmpty()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.voidremoveUnchecked(E key) Removes a key from the collection.intsize()booleanTries 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
-