Class IndexedTraverserSet<S,I>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<Traverser.Admin<S>>
org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet<S>
org.apache.tinkerpop.gremlin.process.traversal.traverser.util.IndexedTraverserSet<S,I>
- All Implemented Interfaces:
Serializable,Iterable<Traverser.Admin<S>>,Collection<Traverser.Admin<S>>,Queue<Traverser.Admin<S>>,Set<Traverser.Admin<S>>
- Direct Known Subclasses:
IndexedTraverserSet.VertexIndexedTraverserSet
A
TraverserSet that has an index back to the object in the Traverser. Using this extension of
TraverserSet can make it easier to find traversers within the set if the internal value is known. Without
the index the entire TraverserSet needs to be iterated to find a particular value.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnIndexedTraverserSetthat indexes based on aVertextraverser. -
Constructor Summary
ConstructorsConstructorDescriptionIndexedTraverserSet(Function<S, I> indexingFunction) IndexedTraverserSet(Function<S, I> indexingFunction, Traverser.Admin<S> traverser) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(Traverser.Admin<S> traverser) voidclear()Gets a collection ofTraverserobjects that contain the specified value.booleanoffer(Traverser.Admin<S> traverser) remove()booleanMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet
bulkSize, contains, element, get, isEmpty, iterator, peek, poll, shuffle, size, sort, spliterator, toStringMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
IndexedTraverserSet
-
IndexedTraverserSet
-
-
Method Details
-
clear
public void clear()- Specified by:
clearin interfaceCollection<S>- Specified by:
clearin interfaceSet<S>- Overrides:
clearin classTraverserSet<S>
-
add
-
get
Gets a collection ofTraverserobjects that contain the specified value.- Parameters:
k- the key produced by the indexing function- Returns:
-
offer
-
remove
-
remove
- Specified by:
removein interfaceCollection<S>- Specified by:
removein interfaceSet<S>- Overrides:
removein classTraverserSet<S>
-