// Path: core/src/main/java/com/github/filosganga/geogson/model/positions/Positions.java
// public interface Positions extends Serializable {
// 
//     /**
//      * Merge this Position with another one returning a new Position resulting of this merge.
//      *
//      * @param other Positions instance.
//      * @return new Positions instance.
//      */
//     Positions merge(Positions other);
// 
//     /**
//      * Return this position children Positions.
//      * @return Iterable of Positions.
//      */
//     List<? extends Positions> children();
// 
//     /**
//      * The size of this positions. The semantic changes between different implementation of Positions.
//      *
//      * @return int.
//      */
//     int size();
// 
// }
// 
// Path: core/src/main/java/com/github/filosganga/geogson/util/Preconditions.java
// public static <T> T checkArgument(T argument, Function<T, Boolean> predicate, Object errorMessage) {
//     if (!predicate.apply(argument)) {
//         throw new IllegalArgumentException(String.valueOf(errorMessage));
//     } else {
//         return argument;
//     }
// }


import com.github.filosganga.geogson.model.positions.Positions;
import java.io.Serializable;
import java.util.Objects;
import static com.github.filosganga.geogson.util.Preconditions.checkArgument;
package com.github.filosganga.geogson.model;





/**
 * Abstract implementation of {@link Geometry} providing generic methods.
 */
public abstract class AbstractGeometry<P extends Positions> implements Geometry<P>, Serializable {

    private static final long serialVersionUID = 1L;

    private final P positions;

// Path: core/src/main/java/com/github/filosganga/geogson/model/positions/Positions.java
// public interface Positions extends Serializable {
// 
//     /**
//      * Merge this Position with another one returning a new Position resulting of this merge.
//      *
//      * @param other Positions instance.
//      * @return new Positions instance.
//      */
//     Positions merge(Positions other);
// 
//     /**
//      * Return this position children Positions.
//      * @return Iterable of Positions.
//      */
//     List<? extends Positions> children();
// 
//     /**
//      * The size of this positions. The semantic changes between different implementation of Positions.
//      *
//      * @return int.
//      */
//     int size();
// 
// }
// 
// Path: core/src/main/java/com/github/filosganga/geogson/util/Preconditions.java
// public static <T> T checkArgument(T argument, Function<T, Boolean> predicate, Object errorMessage) {
//     if (!predicate.apply(argument)) {
//         throw new IllegalArgumentException(String.valueOf(errorMessage));
//     } else {
//         return argument;
//     }
// }


// Path: core/src/main/java/com/github/filosganga/geogson/model/AbstractGeometry.java
import com.github.filosganga.geogson.model.positions.Positions;
import java.io.Serializable;
import java.util.Objects;
import static com.github.filosganga.geogson.util.Preconditions.checkArgument;

package com.github.filosganga.geogson.model;





/**
 * Abstract implementation of {@link Geometry} providing generic methods.
 */
public abstract class AbstractGeometry<P extends Positions> implements Geometry<P>, Serializable {

    private static final long serialVersionUID = 1L;

    private final P positions;

    private transient Integer cachedHashCode = null;