code: public static ArrayList<SegmentString> getSegments(Geometry inputLines, Geometry clipper) {
          ArrayList<SegmentString> segments = new ArrayList<SegmentString>();        
          addGeometryToSegments(inputLines, 0, segments);        
          addGeometryToSegments(clipper, 1, segments);
          return segments;
      }
docs: *
  Convert the input geometries as a list of segments and mark them with a flag
  to identify input and output geometries.
  @param inputLines
  @param clipper
  @return