nl: returns a boolean indicating whether the subpath is degenerate or not . a degenerate subpath is the subpath consisting of a single-point closed path or of two or more points at the same coordinates . concode_field_sep List<Shape> segments concode_elem_sep Point2D startPoint concode_elem_sep boolean closed concode_field_sep Point2D getStartPoint concode_elem_sep boolean isSinglePointOpen concode_elem_sep void addSegment concode_elem_sep boolean isClosed concode_elem_sep boolean isEmpty concode_elem_sep boolean isSinglePointClosed concode_elem_sep List<Point2D> getPiecewiseLinearApproximation concode_elem_sep void setStartPoint concode_elem_sep void setStartPoint concode_elem_sep Point2D getLastPoint concode_elem_sep void setClosed concode_elem_sep List<Shape> getSegments
code: boolean function ( ) { if ( segments . size ( ) > 0 && closed ) { return false ; } for ( Shape loc0 : segments ) { Set < Point2D > loc1 = new HashSet < Point2D > ( loc0 . getBasePoints ( ) ) ; if ( loc1 . size ( ) != 1 ) { return false ; } } return segments . size ( ) > 0 || closed ; }