- All Superinterfaces:
JenaMapSetCommon<Triple>
,JenaSet<Triple>
,JenaSetHashOptimized<Triple>
- All Known Implementing Classes:
FastArrayBunch
,FastHashedTripleBunch
A bunch of triples - a stripped-down set with specialized methods. A
bunch is expected to store triples that share some useful property
(such as having the same subject or predicate).
-
Method Summary
Modifier and TypeMethodDescriptionboolean
anyMatchRandomOrder
(Predicate<Triple> predicate) This method is used to optimize _PO match operations.boolean
isArray()
Answer true iff this bunch is implemented as an array.Methods inherited from interface org.apache.jena.mem2.collection.JenaMapSetCommon
anyMatch, clear, containsKey, isEmpty, keyIterator, keySpliterator, keyStream, keyStreamParallel, removeUnchecked, size, tryRemove
Methods inherited from interface org.apache.jena.mem2.collection.JenaSet
addUnchecked, tryAdd
Methods inherited from interface org.apache.jena.mem2.collection.JenaSetHashOptimized
addUnchecked, removeUnchecked, tryAdd, tryRemove
-
Method Details
-
isArray
boolean isArray()Answer true iff this bunch is implemented as an array. This field is used to optimize some operations by avoiding the need for instanceOf tests.- Returns:
- true iff this bunch is implemented as an arrays
-
anyMatchRandomOrder
This method is used to optimize _PO match operations. TheJenaMapSetCommon.anyMatch(Predicate)
method is faster if there are only a few matches. This method is faster if there are many matches and the set is ordered in an unfavorable way. _PO matches usually fall into this category.- Parameters:
predicate
- the predicate to match- Returns:
- true if any triple in the bunch matches the predicate
-