Enum TraverserRequirement
- java.lang.Object
- 
- java.lang.Enum<TraverserRequirement>
- 
- org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<TraverserRequirement>
 
 public enum TraverserRequirement extends Enum<TraverserRequirement> ATraverserRequirementis a list of requirements that aTraversalrequires of aTraverser. The less requirements, the simpler the traverser can be (both in terms of space and time constraints). EveryStepprovides its specific requirements viaStep.getRequirements().- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description BULKIndicates that theTraversermaintains a bulk count, which represents the multiplicity of traversers being processed.LABELED_PATHRepresents aTraverserRequirementindicating that the traverser must track labeled paths.NESTED_LOOPIndicates that aTraversersupports handling nested loops within a traversal.OBJECTDenotes that a traverser is required to carry an arbitrary object as its state.ONE_BULKRepresents a traverser requirement where each traverser instance is guaranteed to have a bulk of one.PATHRepresents the requirement for a traverser to maintain a path of the elements it has visited.SACKIndicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or intermediate results during the traversal process.SIDE_EFFECTSIndicates that a traverser is expected to interact with and leverage side-effects during the traversal process.SINGLE_LOOPIndicates that the traverser is required to support single loop iteration during the traversal.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static TraverserRequirementvalueOf(String name)Returns the enum constant of this type with the specified name.static TraverserRequirement[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
BULKpublic static final TraverserRequirement BULK Indicates that theTraversermaintains a bulk count, which represents the multiplicity of traversers being processed. This allows optimization by grouping multiple traversers with the same state and treating them as a single entity to reduce computational overhead.
 - 
LABELED_PATHpublic static final TraverserRequirement LABELED_PATH Represents aTraverserRequirementindicating that the traverser must track labeled paths. A labeled path is a collection of steps where specific steps have associated labels, enabling retrieval of intermediate or final results based on these labels during a traversal.This requirement ensures that the traverser has the capability to maintain and access this labeled path information as it progresses through the traversal.
 - 
NESTED_LOOPpublic static final TraverserRequirement NESTED_LOOP Indicates that aTraversersupports handling nested loops within a traversal. This requirement is relevant for traversals where steps can be executed within the context of multiple, potentially recursive loop iterations, enabling complex traversal structures and control flow.
 - 
OBJECTpublic static final TraverserRequirement OBJECT Denotes that a traverser is required to carry an arbitrary object as its state.
 - 
ONE_BULKpublic static final TraverserRequirement ONE_BULK Represents a traverser requirement where each traverser instance is guaranteed to have a bulk of one. This ensures that the traverser is processed individually and not in aggregated bulk.
 - 
PATHpublic static final TraverserRequirement PATH Represents the requirement for a traverser to maintain a path of the elements it has visited. This ensures that the traverser can track its journey through the traversal graph to support path-based computations.
 - 
SACKpublic static final TraverserRequirement SACK Indicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or intermediate results during the traversal process. This requirement allows steps to both read from and write to the sack, enabling computations that span across multiple steps in a traversal.
 - 
SIDE_EFFECTSpublic static final TraverserRequirement SIDE_EFFECTS Indicates that a traverser is expected to interact with and leverage side-effects during the traversal process. Side-effects are data that are collected, shared, or mutated as part of the traversal.
 - 
SINGLE_LOOPpublic static final TraverserRequirement SINGLE_LOOP Indicates that the traverser is required to support single loop iteration during the traversal.
 
- 
 - 
Method Detail- 
valuespublic static TraverserRequirement[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TraverserRequirement c : TraverserRequirement.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static TraverserRequirement valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
 
- 
 
-