code: public static Geometry convert(JGeometry geometry) {
          switch (geometry.getType()) {
          case GTYPE_COLLECTION: return convertCollection(geometry);
          case GTYPE_CURVE: return convertCurve(geometry);
          case GTYPE_MULTICURVE: return convertMultiCurve(geometry);
          case GTYPE_MULTIPOINT: return convertMultiPoint(geometry);
          case GTYPE_MULTIPOLYGON: return convertMultiPolygon(geometry);
          case GTYPE_POINT: return convertPoint(geometry);
          case GTYPE_POLYGON: return convertPolygon(geometry);
          default: throw new IllegalArgumentException(geometry.toString());
          }
      }
docs: to geolatte