public PathSegment(int type,Point2D start,Point2D end,double[] coords){
  this.type=type;
  this.start=start;
  this.end=end;
  this.coords=new double[6];
  System.arraycopy(coords,0,this.coords,0,6);
}

public PathSegment ( int type , Point2D start , Point2D end , double [ ] coords ) { this . type = type ; this . start = start ; this . end = end ; this . coords = new double [ 6 ] ; System . arraycopy ( coords , 0 , this . coords , 0 , 6 ) ; }
initializes a new instance with type , starting and end point , and all other coordinates that are necessary to draw the segment .
