com.sun.electric.tool.generator.flag.router
Class Segment

java.lang.Object
  extended by com.sun.electric.tool.generator.flag.router.Segment
All Implemented Interfaces:
java.lang.Comparable

public class Segment
extends java.lang.Object
implements java.lang.Comparable

A line segment that makes up part of a route


Field Summary
 double max
           
 double min
           
 Track track
           
 int trackNdx
           
 
Constructor Summary
Segment(double xy1, double xy2, Track track, int trackNdx)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 double getSegmentMax()
           
 double getSegmentMin()
           
 double getTrackCenter()
           
 boolean isHorizontal()
           
 java.lang.String toString()
           
 void trim(double xy1, double xy2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

track

public final Track track

trackNdx

public final int trackNdx

min

public double min

max

public double max
Constructor Detail

Segment

public Segment(double xy1,
               double xy2,
               Track track,
               int trackNdx)
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

isHorizontal

public boolean isHorizontal()

getTrackCenter

public double getTrackCenter()

getSegmentMin

public double getSegmentMin()

getSegmentMax

public double getSegmentMax()

trim

public void trim(double xy1,
                 double xy2)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object