Record Class ScmWalk

java.lang.Object
java.lang.Record
org.impulsegraph.compiler.ast.ScmWalk
All Implemented Interfaces:
ImpScmNode

public record ScmWalk(String relationName, int relationId, ScmWalk.Direction direction, List<ImpScmNode> shaderSteps, List<ImpScmNode> subSteps) extends Record implements ImpScmNode
Graph traversal walk step (CSR forward or CSC reverse).
  • Constructor Details

    • ScmWalk

      public ScmWalk(String relationName, int relationId, ScmWalk.Direction direction, List<ImpScmNode> shaderSteps, List<ImpScmNode> subSteps)
      Creates an instance of a ScmWalk record class.
      Parameters:
      relationName - the value for the relationName record component
      relationId - the value for the relationId record component
      direction - the value for the direction record component
      shaderSteps - the value for the shaderSteps record component
      subSteps - the value for the subSteps record component
    • ScmWalk

      public ScmWalk(String relationName, int relationId, ScmWalk.Direction direction)
  • Method Details

    • forward

      public static ScmWalk forward(String relationName)
    • forward

      public static ScmWalk forward(String relationName, ImpScmNode filter)
    • reverse

      public static ScmWalk reverse(String relationName)
    • reverse

      public static ScmWalk reverse(String relationName, ImpScmNode filter)
    • auto

      public static ScmWalk auto(String relationName)
    • withRelationId

      public ScmWalk withRelationId(int id)
    • withDirection

      public ScmWalk withDirection(ScmWalk.Direction newDir)
    • withShaderSteps

      public ScmWalk withShaderSteps(List<ImpScmNode> newShaderSteps)
    • withSubSteps

      public ScmWalk withSubSteps(List<ImpScmNode> newSubSteps)
    • toScmString

      public String toScmString()
      Specified by:
      toScmString in interface ImpScmNode
    • accept

      public <R> R accept(ImpScmVisitor<R> visitor)
      Specified by:
      accept in interface ImpScmNode
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • relationName

      public String relationName()
      Returns the value of the relationName record component.
      Returns:
      the value of the relationName record component
    • relationId

      public int relationId()
      Returns the value of the relationId record component.
      Returns:
      the value of the relationId record component
    • direction

      public ScmWalk.Direction direction()
      Returns the value of the direction record component.
      Returns:
      the value of the direction record component
    • shaderSteps

      public List<ImpScmNode> shaderSteps()
      Returns the value of the shaderSteps record component.
      Returns:
      the value of the shaderSteps record component
    • subSteps

      public List<ImpScmNode> subSteps()
      Returns the value of the subSteps record component.
      Returns:
      the value of the subSteps record component