public String[] segments(){
  String[] segmentCopy=new String[segments.length];
  System.arraycopy(segments,0,segmentCopy,0,segments.length);
  return segmentCopy;
}

public String [ ] segments ( ) { String [ ] segmentCopy = new String [ segments . length ] ; System . arraycopy ( segments , 0 , segmentCopy , 0 , segments . length ) ; return segmentCopy ; }
returns the segments in this path in order .
