Class DropLabelsStep<S extends Element>
java.lang.Object
org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,S>
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep<S>
org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.DropLabelsStep<S>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<S>>,Step<S,,S> Mutating<Event.ElementLabelChangedEvent>,PopContaining,TraversalParent
public class DropLabelsStep<S extends Element>
extends SideEffectStep<S>
implements Mutating<Event.ElementLabelChangedEvent>, TraversalParent
Side-effect step that removes labels from the current element by calling
Element.dropLabels() or Element.dropLabel(String, String...).- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstruction -
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild -
Constructor Summary
ConstructorsConstructorDescriptionDropLabelsStep(Traversal.Admin traversal) Constructor for dropLabels() - removes all labels.DropLabelsStep(Traversal.Admin traversal, String label, String... moreLabels) Constructor for dropLabel(String, String...) - removes specific labels.DropLabelsStep(Traversal.Admin traversal, List<Traversal.Admin<S, ?>> labelTraversals) Constructor for one or more label traversals - removes dynamically computed label(s). -
Method Summary
Modifier and TypeMethodDescriptionclone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.List<Traversal.Admin<S,?>> Gets a list of all "local" child traversals for this step.Gets the callback registry for events that the step raises.Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.inthashCode()voidsetTraversal(Traversal.Admin<?, ?> parentTraversal) Set theTraversalthat this step is contained within.protected voidsideEffect(Traverser.Admin<S> traverser) toString()Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectStep
processNextStartMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, reset, setId, setNextStep, setPreviousStepMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getPopInstructions, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
Constructor Details
-
DropLabelsStep
Constructor for dropLabels() - removes all labels. -
DropLabelsStep
Constructor for dropLabel(String, String...) - removes specific labels. -
DropLabelsStep
Constructor for one or more label traversals - removes dynamically computed label(s). If exactly one traversal is given and it produces aCollection, the collection is unfolded into the set of labels removed; otherwise each traversal must resolve to a singleStringlabel.
-
-
Method Details
-
sideEffect
- Specified by:
sideEffectin classSideEffectStep<S extends Element>
-
getMutatingCallbackRegistry
Description copied from interface:MutatingGets the callback registry for events that the step raises.- Specified by:
getMutatingCallbackRegistryin interfaceMutating<S extends Element>
-
getRequirements
Description copied from interface:StepProvide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set. -
toString
-
hashCode
public int hashCode() -
getLocalChildren
Description copied from interface:TraversalParentGets a list of all "local" child traversals for this step. A "local" traversal is one which is evaluated independently for each incoming traverser to the parent step. This is typically used in cases where the child is used to process or augment each traverser individually. SeeLocalSteporByModulatingas examples.- Specified by:
getLocalChildrenin interfaceTraversalParent
-
clone
Description copied from interface:StepCloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step whenStep.reset()is called. Moreover, the previous and next steps should be set toEmptyStep. -
setTraversal
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
setTraversalin interfaceStep<S extends Element,S extends Element> - Overrides:
setTraversalin classAbstractStep<S extends Element,S extends Element> - Parameters:
parentTraversal- the new traversal for this step
-