question: public SegmentPath complete ( EndType etype ) { SegmentPath result ; if ( data == null || w < 6 ) { return null ; } if ( w == data . length ) { result = new SegmentPath ( data , etype ) ; reset ( 0 ) ; } else { double [ ] dataToAdopt = new double [ w ] ; System . arraycopy ( data , 0 , dataToAdopt , 0 , w ) ; result = new SegmentPath ( dataToAdopt , etype ) ; reset ( 2 ) ; } return result ; }
target:  Complete building a SegmentPath.  Once this is called, the builder is restored to its initial state and information about the previous path is released.  The end type indicates whether to treat the path as closed, extended, or pinned.