// Path: src/main/java/com/github/davidmoten/rtree/geometry/Geometry.java
// public interface Geometry {
// 
//     /**
//      * <p>
//      * Returns the distance to the given {@link Rectangle}. For a {@link Rectangle}
//      * this might be Euclidean distance but for an EPSG4326 lat-long Rectangle might
//      * be great-circle distance. The distance function should satisfy the following
//      * properties:
//      * </p>
//      * 
//      * <p>
//      * <code>distance(r) &gt;= 0</code>
//      * </p>
//      * 
//      * <p>
//      * <code>if r1 contains r2 then distance(r1)&lt;=distance(r2)</code>
//      * </p>
//      * 
//      * 
//      * @param r
//      *            rectangle to measure distance to
//      * @return distance to the rectangle r from the geometry
//      */
//     double distance(Rectangle r);
// 
//     /**
//      * Returns the minimum bounding rectangle of this geometry.
//      * 
//      * @return minimum bounding rectangle
//      */
//     Rectangle mbr();
// 
//     boolean intersects(Rectangle r);
// 
//     boolean isDoublePrecision();
// }
// 
// Path: src/main/java/com/github/davidmoten/rtree/internal/FactoryDefault.java
// public final class FactoryDefault<T, S extends Geometry> implements Factory<T, S> {
// 
//     private static class Holder {
//         private static final Factory<Object, Geometry> INSTANCE = new FactoryDefault<>();
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T, S extends Geometry> Factory<T, S> instance() {
//         return (Factory<T, S>) Holder.INSTANCE;
//     }
// 
//     @Override
//     public Leaf<T, S> createLeaf(List<Entry<T, S>> entries, Context<T, S> context) {
//         return new LeafDefault<>(entries, context);
//     }
// 
//     @Override
//     public NonLeaf<T, S> createNonLeaf(List<? extends Node<T, S>> children, Context<T, S> context) {
//         return new NonLeafDefault<>(children, context);
//     }
// 
//     @Override
//     public Entry<T, S> createEntry(T value, S geometry) {
//         return Entries.entry(value, geometry);
//     }
// 
// }


import com.github.davidmoten.rtree.geometry.Geometry;
import com.github.davidmoten.rtree.internal.FactoryDefault;
package com.github.davidmoten.rtree;


public final class Factories {

    private Factories() {
        // prevent instantiation
    }

// Path: src/main/java/com/github/davidmoten/rtree/geometry/Geometry.java
// public interface Geometry {
// 
//     /**
//      * <p>
//      * Returns the distance to the given {@link Rectangle}. For a {@link Rectangle}
//      * this might be Euclidean distance but for an EPSG4326 lat-long Rectangle might
//      * be great-circle distance. The distance function should satisfy the following
//      * properties:
//      * </p>
//      * 
//      * <p>
//      * <code>distance(r) &gt;= 0</code>
//      * </p>
//      * 
//      * <p>
//      * <code>if r1 contains r2 then distance(r1)&lt;=distance(r2)</code>
//      * </p>
//      * 
//      * 
//      * @param r
//      *            rectangle to measure distance to
//      * @return distance to the rectangle r from the geometry
//      */
//     double distance(Rectangle r);
// 
//     /**
//      * Returns the minimum bounding rectangle of this geometry.
//      * 
//      * @return minimum bounding rectangle
//      */
//     Rectangle mbr();
// 
//     boolean intersects(Rectangle r);
// 
//     boolean isDoublePrecision();
// }
// 
// Path: src/main/java/com/github/davidmoten/rtree/internal/FactoryDefault.java
// public final class FactoryDefault<T, S extends Geometry> implements Factory<T, S> {
// 
//     private static class Holder {
//         private static final Factory<Object, Geometry> INSTANCE = new FactoryDefault<>();
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T, S extends Geometry> Factory<T, S> instance() {
//         return (Factory<T, S>) Holder.INSTANCE;
//     }
// 
//     @Override
//     public Leaf<T, S> createLeaf(List<Entry<T, S>> entries, Context<T, S> context) {
//         return new LeafDefault<>(entries, context);
//     }
// 
//     @Override
//     public NonLeaf<T, S> createNonLeaf(List<? extends Node<T, S>> children, Context<T, S> context) {
//         return new NonLeafDefault<>(children, context);
//     }
// 
//     @Override
//     public Entry<T, S> createEntry(T value, S geometry) {
//         return Entries.entry(value, geometry);
//     }
// 
// }


// Path: src/main/java/com/github/davidmoten/rtree/Factories.java
import com.github.davidmoten.rtree.geometry.Geometry;
import com.github.davidmoten.rtree.internal.FactoryDefault;

package com.github.davidmoten.rtree;


public final class Factories {

    private Factories() {
        // prevent instantiation
    }

    public static <T, S extends Geometry> Factory<T, S> defaultFactory() {