java.lang.Object
org.apache.jena.mem.collection.FastHashBase<Triple>
org.apache.jena.mem.collection.FastHashSet<Triple>
org.apache.jena.mem.store.fast.FastHashedTripleBunch
- All Implemented Interfaces:
Iterable<Triple>,org.apache.jena.atlas.lib.Copyable<FastTripleBunch>,JenaMapSetCommon<Triple>,JenaSet<Triple>,JenaSetHashOptimized<Triple>,JenaSetIndexed<Triple>,Sized,FastTripleBunch
Hashed implementation of
FastTripleBunch built on top of
FastHashSet. Used by FastTripleStore once a bunch grows
past the size threshold at which a linear-scan FastArrayBunch
stops being faster.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jena.mem.collection.FastHashBase
FastHashBase.KeyAndIndexConsumer<K> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty hashed bunch with the default initial capacity.Create a new hashed bunch pre-populated from the given set of triples. -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanisArray()Answertrueiff this bunch is backed by a flat array (i.e. is aFastArrayBunch).Methods inherited from class org.apache.jena.mem.collection.FastHashSet
addAndGetIndex, addUnchecked, addUnchecked, forEach, tryAdd, tryAddMethods inherited from class org.apache.jena.mem.collection.FastHashBase
anyMatch, anyMatchRandomOrder, clear, containsKey, forEachKey, getKeyAt, indexOf, isEmpty, keyIterator, keySpliterator, removeAndGetIndex, removeUnchecked, removeUnchecked, size, tryRemove, tryRemoveMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jena.mem.store.fast.FastTripleBunch
anyMatchRandomOrderMethods inherited from interface org.apache.jena.mem.collection.JenaMapSetCommon
anyMatch, clear, containsKey, isEmpty, keyIterator, keySpliterator, keyStream, keyStreamParallel, removeUnchecked, tryRemoveMethods inherited from interface org.apache.jena.mem.collection.JenaSet
addUnchecked, forEach, iterator, spliterator, tryAddMethods inherited from interface org.apache.jena.mem.collection.JenaSetHashOptimized
addUnchecked, removeUnchecked, tryAdd, tryRemoveMethods inherited from interface org.apache.jena.mem.collection.JenaSetIndexed
getKeyAt, indexOf, removeAndGetIndex
-
Constructor Details
-
FastHashedTripleBunch
Create a new hashed bunch pre-populated from the given set of triples. The initial capacity is chosen at 1.5x the source size, so the new bunch fits the existing triples and has some headroom for growth before it needs to rehash.- Parameters:
set- the source set of triples (typically the array bunch being promoted)
-
FastHashedTripleBunch
public FastHashedTripleBunch()Creates an empty hashed bunch with the default initial capacity.
-
-
Method Details
-
isArray
public boolean isArray()Description copied from interface:FastTripleBunchAnswertrueiff this bunch is backed by a flat array (i.e. is aFastArrayBunch). Exposed as an explicit method so callers can avoidinstanceofchecks on this hot path.- Specified by:
isArrayin interfaceFastTripleBunch- Returns:
trueif this bunch is array-backed
-
copy
- Specified by:
copyin interfaceorg.apache.jena.atlas.lib.Copyable<FastTripleBunch>
-