Class RoutePath

java.lang.Object
com._1c.g5.v8.dt.common.gef.drow2d.RoutePath
All Implemented Interfaces:
Comparable<RoutePath>

public class RoutePath extends Object implements Comparable<RoutePath>
 The path information:
  - points list
  - amount of the crossings
  - summary length of the path segments
 
  • Field Details

    • path

      public final org.eclipse.draw2d.geometry.PointList path
    • cross

      public final int cross
    • length

      public final int length
  • Constructor Details

    • RoutePath

      public RoutePath(org.eclipse.draw2d.geometry.PointList path, int cross, int length)
      Constructor.
      Parameters:
      path - - points list
      cross - - amount of the crossings
      length - - summary length of the path segments
  • Method Details

    • compareTo

      public int compareTo(RoutePath other)
      Compares two RoutePath objects using count of the cross and length.
      Priorities: numbers of intersections, length
      Specified by:
      compareTo in interface Comparable<RoutePath>
      Parameters:
      other - - the RoutePath to be compared.
    • min

      public static RoutePath min(RoutePath p1, RoutePath p2)
      Returns the smaller of two RoutePath values using compareTo(RoutePath)
      Parameters:
      p1 - - an argument.
      p2 - - another argument.
      Returns:
      the smaller of two RoutePath values