java.lang.Object
org.apache.jena.mem2.store.legacy.NodeToTriplesMapMem
- All Implemented Interfaces:
JenaMapSetCommon<Triple>
,JenaSet<Triple>
,NodeToTriplesMap
-
Constructor Summary
ConstructorDescriptionNodeToTriplesMapMem
(Triple.Field indexField, Triple.Field f2, Triple.Field f3) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the key to the set without checking if it is already present.boolean
Check whether the collection contains any element matching the predicate.void
clear()
Clear the collection.boolean
containsKey
(Triple triple) Check whether the collection contains a given key.boolean
containsMatch
(Node index, Node n2, Node n3) Answer true iff this map contains a triple that matches the pattern.copy()
Create a copy of this map.boolean
isEmpty()
iteratorForMatches
(Node index, Node n2, Node n3) Answer an iterator over all the triples in this map that match the pattern.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.void
Removes a key from the collection.int
size()
streamForMatches
(Node index, Node n2, Node n3) Answer a stream over all the triples in this map that match the pattern.boolean
Add the key to the set if it is not already present.boolean
Tries to remove a key from the collection.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jena.mem2.collection.JenaMapSetCommon
keyStreamParallel
-
Constructor Details
-
NodeToTriplesMapMem
-
-
Method Details
-
clear
public void clear()Description copied from interface:JenaMapSetCommon
Clear the collection.- Specified by:
clear
in interfaceJenaMapSetCommon<Triple>
-
size
public int size()- Specified by:
size
in interfaceJenaMapSetCommon<Triple>
- Returns:
- the number of elements in the collection
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceJenaMapSetCommon<Triple>
- Returns:
- true if the collection is empty
-
tryAdd
Description copied from interface:JenaSet
Add the key to the set if it is not already present. -
addUnchecked
Description copied from interface:JenaSet
Add the key to the set without checking if it is already present. Attention: This method must only be used if it is guaranteed that the key is not already present.- Specified by:
addUnchecked
in interfaceJenaSet<Triple>
- Parameters:
t
- the key to add
-
tryRemove
Description copied from interface:JenaMapSetCommon
Tries to remove a key from the collection.- Specified by:
tryRemove
in interfaceJenaMapSetCommon<Triple>
- Parameters:
t
- the key to remove- Returns:
- true if the key was removed. If the key was not present, false is returned.
-
removeUnchecked
Description copied from interface:JenaMapSetCommon
Removes a key from the collection. Attention: Implementations may assume that the key is present.- Specified by:
removeUnchecked
in interfaceJenaMapSetCommon<Triple>
- Parameters:
t
- the key to remove
-
keyIterator
Description copied from interface:JenaMapSetCommon
Get an iterator over the keys in the collection.- Specified by:
keyIterator
in interfaceJenaMapSetCommon<Triple>
- Returns:
- an iterator over the keys in the collection
-
keySpliterator
Description copied from interface:JenaMapSetCommon
Get a spliterator over the keys in the collection.- Specified by:
keySpliterator
in interfaceJenaMapSetCommon<Triple>
- Returns:
- a spliterator over the keys in the collection
-
keyStream
Description copied from interface:JenaMapSetCommon
Get a stream over the keys in the collection.- Specified by:
keyStream
in interfaceJenaMapSetCommon<Triple>
- Returns:
- a stream over the keys in the collection
-
iteratorForMatches
Description copied from interface:NodeToTriplesMap
Answer an iterator over all the triples in this map that match the pattern.- Specified by:
iteratorForMatches
in interfaceNodeToTriplesMap
- Parameters:
index
- The node to match as key.n2
- A node to match, or Node.ANY.n3
- A node to match, or Node.ANY.- Returns:
- An iterator over all the triples in this map that match the pattern.
-
streamForMatches
Description copied from interface:NodeToTriplesMap
Answer a stream over all the triples in this map that match the pattern.- Specified by:
streamForMatches
in interfaceNodeToTriplesMap
- Parameters:
index
- The node to match as key.n2
- A node to match, or Node.ANY.n3
- A node to match, or Node.ANY.- Returns:
- A stream over all the triples in this map that match the pattern.
-
containsMatch
Description copied from interface:NodeToTriplesMap
Answer true iff this map contains a triple that matches the pattern.- Specified by:
containsMatch
in interfaceNodeToTriplesMap
- Parameters:
index
- The node to match as key.n2
- A node to match, or Node.ANY.n3
- A node to match, or Node.ANY.- Returns:
- True iff this map contains a triple that matches the pattern.
-
copy
Description copied from interface:NodeToTriplesMap
Create a copy of this map. The new map will contain all the same nodes as keys of this map, but copies of the bunches as values.- Specified by:
copy
in interfaceNodeToTriplesMap
- Returns:
- an independent copy of this map
-
containsKey
Description copied from interface:JenaMapSetCommon
Check whether the collection contains a given key.- Specified by:
containsKey
in interfaceJenaMapSetCommon<Triple>
- Parameters:
triple
- the key to look for- Returns:
- true if the collection contains the key
-
anyMatch
Description copied from interface:JenaMapSetCommon
Check whether the collection contains any element matching the predicate.- Specified by:
anyMatch
in interfaceJenaMapSetCommon<Triple>
- Parameters:
predicate
- the predicate to match- Returns:
- true if the collection contains any element matching the predicate
-