// Path: core/src/main/java/com/github/filosganga/geogson/codec/Codec.java
// public interface Codec<S, T extends Geometry<?>> {
// 
//     /**
//      * Converts the given S instance to T.
//      *
//      * @param src a S instance to convert.
//      * @return a T instance.
//      */
//     T toGeometry(S src);
// 
//     /**
//      * Converts the given T instance to S.
//      *
//      * @param src a T instance to convert.
//      * @return a S instance.
//      */
//     S fromGeometry(T src);
// }
// 
// Path: core/src/main/java/com/github/filosganga/geogson/util/Preconditions.java
// public static <T> T checkNotNull(T argument) {
//     return checkNotNull(argument,"Argument should be not null");
// }


import com.github.filosganga.geogson.codec.Codec;
import com.github.filosganga.geogson.model.*;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.GeometryFactory;
import java.util.ArrayList;
import java.util.stream.StreamSupport;
import static com.github.filosganga.geogson.util.Preconditions.checkNotNull;
package com.github.filosganga.geogson.jts;




/**
 * Abstract JTS implementation of Codec.
 * <p>
 * It provides support for JTS conversions.
 */
public abstract class AbstractJtsCodec<S, T extends Geometry<?>> implements Codec<S, T> {

    /**
     * {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    protected final GeometryFactory geometryFactory;

    /**
     * Get the {@link GeometryFactory} of this {@link AbstractJtsCodec} (gotten
     * via constructor)
     *
     * @return the {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    public GeometryFactory getGeometryFactory() {
        return this.geometryFactory;
    }

    /**
     * Create a codec with a given {@link GeometryFactory}
     *
     * @param geometryFactory a {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    public AbstractJtsCodec(GeometryFactory geometryFactory) {
// Path: core/src/main/java/com/github/filosganga/geogson/codec/Codec.java
// public interface Codec<S, T extends Geometry<?>> {
// 
//     /**
//      * Converts the given S instance to T.
//      *
//      * @param src a S instance to convert.
//      * @return a T instance.
//      */
//     T toGeometry(S src);
// 
//     /**
//      * Converts the given T instance to S.
//      *
//      * @param src a T instance to convert.
//      * @return a S instance.
//      */
//     S fromGeometry(T src);
// }
// 
// Path: core/src/main/java/com/github/filosganga/geogson/util/Preconditions.java
// public static <T> T checkNotNull(T argument) {
//     return checkNotNull(argument,"Argument should be not null");
// }


// Path: jts/src/main/java/com/github/filosganga/geogson/jts/AbstractJtsCodec.java
import com.github.filosganga.geogson.codec.Codec;
import com.github.filosganga.geogson.model.*;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.GeometryFactory;
import java.util.ArrayList;
import java.util.stream.StreamSupport;
import static com.github.filosganga.geogson.util.Preconditions.checkNotNull;

package com.github.filosganga.geogson.jts;




/**
 * Abstract JTS implementation of Codec.
 * <p>
 * It provides support for JTS conversions.
 */
public abstract class AbstractJtsCodec<S, T extends Geometry<?>> implements Codec<S, T> {

    /**
     * {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    protected final GeometryFactory geometryFactory;

    /**
     * Get the {@link GeometryFactory} of this {@link AbstractJtsCodec} (gotten
     * via constructor)
     *
     * @return the {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    public GeometryFactory getGeometryFactory() {
        return this.geometryFactory;
    }

    /**
     * Create a codec with a given {@link GeometryFactory}
     *
     * @param geometryFactory a {@link GeometryFactory} defining a PrecisionModel and a SRID
     */
    public AbstractJtsCodec(GeometryFactory geometryFactory) {
        this.geometryFactory = checkNotNull(geometryFactory, "The geometryFactory cannot be null");