Class AbstractHighwayMatrix.HighwayPtr

java.lang.Object
com._1c.g5.v8.dt.common.gef.drow2d.AbstractHighwayMatrix.HighwayPtr
Enclosing class:
AbstractHighwayMatrix

protected static class AbstractHighwayMatrix.HighwayPtr extends Object
Wrapper on the Highway. Contains index of the highway in the highways list for quick operation of the get index of element. Overrides hashCode() and equals() for quick operations with hash map and hash set.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Highway
    the wrapped element
    int
    the index on the highways list
  • Constructor Summary

    Constructors
    Constructor
    Description
    HighwayPtr(Highway highway, int index)
    Create HighwayPtr using specified highway and index
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares the indexes (after standart checks of the null and type).
    int
    Returns the index
    Returns the string in the format: <index>: <highway.ToString()>

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • highway

      public final Highway highway
      the wrapped element
    • index

      public int index
      the index on the highways list
  • Constructor Details

    • HighwayPtr

      public HighwayPtr(Highway highway, int index)
      Create HighwayPtr using specified highway and index
      Parameters:
      highway - - the highway
      index - - the index
  • Method Details

    • hashCode

      public int hashCode()
      Returns the index
      Overrides:
      hashCode in class Object
      Returns:
      the index
    • equals

      public boolean equals(Object obj)
      Compares the indexes (after standart checks of the null and type).
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Returns the string in the format: <index>: <highway.ToString()>
      Overrides:
      toString in class Object