Record Class ScriptGraph.GraphEdge

java.lang.Object
java.lang.Record
com.soulfiremc.server.script.ScriptGraph.GraphEdge
Record Components:
sourceNodeId - the source node ID
sourceHandle - the output handle on the source node
targetNodeId - the target node ID
targetHandle - the input handle on the target node
edgeType - whether this is an execution or data edge
Enclosing class:
ScriptGraph

public static record ScriptGraph.GraphEdge(String sourceNodeId, String sourceHandle, String targetNodeId, String targetHandle, ScriptGraph.EdgeType edgeType) extends Record
Represents an edge connecting two nodes.
  • Constructor Details

    • GraphEdge

      public GraphEdge(String sourceNodeId, String sourceHandle, String targetNodeId, String targetHandle, ScriptGraph.EdgeType edgeType)
      Creates an instance of a GraphEdge record class.
      Parameters:
      sourceNodeId - the value for the sourceNodeId record component
      sourceHandle - the value for the sourceHandle record component
      targetNodeId - the value for the targetNodeId record component
      targetHandle - the value for the targetHandle record component
      edgeType - the value for the edgeType record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • sourceNodeId

      public String sourceNodeId()
      Returns the value of the sourceNodeId record component.
      Returns:
      the value of the sourceNodeId record component
    • sourceHandle

      public String sourceHandle()
      Returns the value of the sourceHandle record component.
      Returns:
      the value of the sourceHandle record component
    • targetNodeId

      public String targetNodeId()
      Returns the value of the targetNodeId record component.
      Returns:
      the value of the targetNodeId record component
    • targetHandle

      public String targetHandle()
      Returns the value of the targetHandle record component.
      Returns:
      the value of the targetHandle record component
    • edgeType

      public ScriptGraph.EdgeType edgeType()
      Returns the value of the edgeType record component.
      Returns:
      the value of the edgeType record component