Enum Class TraverserRequirement

java.lang.Object
java.lang.Enum<TraverserRequirement>
org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement
All Implemented Interfaces:
Serializable, Comparable<TraverserRequirement>, Constable

public enum TraverserRequirement extends Enum<TraverserRequirement>
A TraverserRequirement is a list of requirements that a Traversal requires of a Traverser. The less requirements, the simpler the traverser can be (both in terms of space and time constraints). Every Step provides its specific requirements via Step.getRequirements().
Author:
Marko A. Rodriguez (http://markorodriguez.com)
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates that the Traverser maintains a bulk count, which represents the multiplicity of traversers being processed.
    Represents a TraverserRequirement indicating that the traverser must track labeled paths.
    Indicates that a Traverser supports handling nested loops within a traversal.
    Denotes that a traverser is required to carry an arbitrary object as its state.
    Represents a traverser requirement where each traverser instance is guaranteed to have a bulk of one.
    Represents the requirement for a traverser to maintain a path of the elements it has visited.
    Indicates that a traverser carries a "sack", which is a mutable structure used to hold aggregated or intermediate results during the traversal process.
    Indicates that a traverser is expected to interact with and leverage side-effects during the traversal process.
    Indicates that the traverser is required to support single loop iteration during the traversal.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BULK

      public static final TraverserRequirement BULK
      Indicates that the Traverser maintains 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_PATH

      public static final TraverserRequirement LABELED_PATH
      Represents a TraverserRequirement indicating 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_LOOP

      public static final TraverserRequirement NESTED_LOOP
      Indicates that a Traverser supports 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.
    • OBJECT

      public static final TraverserRequirement OBJECT
      Denotes that a traverser is required to carry an arbitrary object as its state.
    • ONE_BULK

      public 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.
    • PATH

      public 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.
    • SACK

      public 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_EFFECTS

      public 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_LOOP

      public static final TraverserRequirement SINGLE_LOOP
      Indicates that the traverser is required to support single loop iteration during the traversal.
  • Method Details

    • values

      public static TraverserRequirement[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TraverserRequirement valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null