question: public int addSegmentList ( int index , WKTSegmentList segmentListToAdd ) { List < WKTSegmentList > localSegmentList = null ; if ( index < 0 ) { return - 1 ; } else { if ( index >= segmentList . size ( ) ) { localSegmentList = new ArrayList < WKTSegmentList > ( ) ; segmentList . add ( localSegmentList ) ; } else { localSegmentList = segmentList . get ( index ) ; } localSegmentList . add ( segmentListToAdd ) ; } return localSegmentList . size ( ) - 1 ; }
target:  Adds the segment list.