Record Class ScmLaneSetEdgeMask

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

public record ScmLaneSetEdgeMask(String relationName, int relationId, List<Long> trippedEdgePerLane, boolean packedMultiEdge) extends Record implements ImpScmNode
Per-lane tripped edge mask configuration for N-1 / N-2 contingency simulation (opcode 0xC2 OP_LANE_SET_EDGE_MASK).
  • Constructor Details

    • ScmLaneSetEdgeMask

      public ScmLaneSetEdgeMask(String relationName, int relationId, List<Long> trippedEdgePerLane, boolean packedMultiEdge)
      Creates an instance of a ScmLaneSetEdgeMask record class.
      Parameters:
      relationName - the value for the relationName record component
      relationId - the value for the relationId record component
      trippedEdgePerLane - the value for the trippedEdgePerLane record component
      packedMultiEdge - the value for the packedMultiEdge record component
  • Method Details

    • of

      public static ScmLaneSetEdgeMask of(String relationName, List<Long> trippedEdgePerLane)
    • fromInlinePairs

      public static ScmLaneSetEdgeMask fromInlinePairs(String relationName, List<Long> edgeLanePairs)
    • pairsReg

      public int pairsReg()
    • edgeLanePairs

      public List<Long> edgeLanePairs()
    • withRelationId

      public ScmLaneSetEdgeMask withRelationId(int id)
    • 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
    • trippedEdgePerLane

      public List<Long> trippedEdgePerLane()
      Returns the value of the trippedEdgePerLane record component.
      Returns:
      the value of the trippedEdgePerLane record component
    • packedMultiEdge

      public boolean packedMultiEdge()
      Returns the value of the packedMultiEdge record component.
      Returns:
      the value of the packedMultiEdge record component