Record Class GeometricGraphArcRecord<N extends GeometricGraphNode,A extends GeometricGraphArc>

java.lang.Object
java.lang.Record
com.amalgamasimulation.graphagent.GeometricGraphArcRecord<N,A>

public record GeometricGraphArcRecord<N extends GeometricGraphNode,A extends GeometricGraphArc>(int arcIndex, Graph<N extends GeometricGraphNode,A extends GeometricGraphArc>.Arc arc, Interval arcAbsOffsets, Interval pathAbsOffsets, GeometricGraphPosition<N extends GeometricGraphNode,A extends GeometricGraphArc> beginPosition, GeometricGraphPosition<N extends GeometricGraphNode,A extends GeometricGraphArc> endPosition) extends Record
Record containing reference to an arc within a GeometricGraphPath and characteristics describing its position inside the GeometricGraphPath
  • Constructor Details

    • GeometricGraphArcRecord

      public GeometricGraphArcRecord(int arcIndex, Graph<N,A>.Arc arc, Interval arcAbsOffsets, Interval pathAbsOffsets, GeometricGraphPosition<N,A> beginPosition, GeometricGraphPosition<N,A> endPosition)
      Creates an instance of a GeometricGraphArcRecord record class.
      Parameters:
      arcIndex - the value for the arcIndex record component
      arc - the value for the arc record component
      arcAbsOffsets - the value for the arcAbsOffsets record component
      pathAbsOffsets - the value for the pathAbsOffsets record component
      beginPosition - the value for the beginPosition record component
      endPosition - the value for the endPosition 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • arcIndex

      public int arcIndex()
      Returns the value of the arcIndex record component.
      Returns:
      the value of the arcIndex record component
    • arc

      public Graph<N,A>.Arc arc()
      Returns the value of the arc record component.
      Returns:
      the value of the arc record component
    • arcAbsOffsets

      public Interval arcAbsOffsets()
      Returns the value of the arcAbsOffsets record component.
      Returns:
      the value of the arcAbsOffsets record component
    • pathAbsOffsets

      public Interval pathAbsOffsets()
      Returns the value of the pathAbsOffsets record component.
      Returns:
      the value of the pathAbsOffsets record component
    • beginPosition

      public GeometricGraphPosition<N,A> beginPosition()
      Returns the value of the beginPosition record component.
      Returns:
      the value of the beginPosition record component
    • endPosition

      public GeometricGraphPosition<N,A> endPosition()
      Returns the value of the endPosition record component.
      Returns:
      the value of the endPosition record component