if (segments.size() < 1) { throw new IllegalArgumentException(); } this.length = (int) actualLength.getLength();
    public TrainPath(TrainPath p) {	length = p.length;	actualLength = new PathLength(p.actualLength);	ListIterator i = p.segments.listIterator(0);	while (i.hasNext()) {	    segments.add(new IntLine((IntLine) i.next()));	}    }