// Path: src/main/java/com/github/davidmoten/util/ObjectsHelper.java
// public final class ObjectsHelper {
// 
//     private ObjectsHelper() {
//         // prevent instantiation
//     }
// 
//     static void instantiateForTestCoveragePurposesOnly() {
//         new ObjectsHelper();
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T> Optional<T> asClass(Object object, Class<T> cls) {
//         if (object == null)
//             return absent();
//         else if (object.getClass() != cls)
//             return absent();
//         else
//             return Optional.of((T) object);
//     }
// 
// }


import com.github.davidmoten.util.ObjectsHelper;
import com.google.common.base.Objects;
import com.google.common.base.Optional;
        float dx = mbb().x1() - p.mbb().x1();
        float dy = mbb().y1() - p.mbb().y1();
        float dz = mbb().z1() - p.mbb().z1();
        return dx * dx + dy * dy + dz * dz;
    }

    @Override
    public boolean intersects(Box r) {
        return mbr.intersects(r);
    }

    public float x() {
        return mbr.x1();
    }

    public float y() {
        return mbr.y1();
    }

    public float z() {
        return mbr.z1();
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(mbr);
    }

    @Override
    public boolean equals(Object obj) {
// Path: src/main/java/com/github/davidmoten/util/ObjectsHelper.java
// public final class ObjectsHelper {
// 
//     private ObjectsHelper() {
//         // prevent instantiation
//     }
// 
//     static void instantiateForTestCoveragePurposesOnly() {
//         new ObjectsHelper();
//     }
// 
//     @SuppressWarnings("unchecked")
//     public static <T> Optional<T> asClass(Object object, Class<T> cls) {
//         if (object == null)
//             return absent();
//         else if (object.getClass() != cls)
//             return absent();
//         else
//             return Optional.of((T) object);
//     }
// 
// }


// Path: src/main/java/com/github/davidmoten/rtree3d/geometry/Point.java
import com.github.davidmoten.util.ObjectsHelper;
import com.google.common.base.Objects;
import com.google.common.base.Optional;

        float dx = mbb().x1() - p.mbb().x1();
        float dy = mbb().y1() - p.mbb().y1();
        float dz = mbb().z1() - p.mbb().z1();
        return dx * dx + dy * dy + dz * dz;
    }

    @Override
    public boolean intersects(Box r) {
        return mbr.intersects(r);
    }

    public float x() {
        return mbr.x1();
    }

    public float y() {
        return mbr.y1();
    }

    public float z() {
        return mbr.z1();
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(mbr);
    }

    @Override
    public boolean equals(Object obj) {
        Optional<Point> other = ObjectsHelper.asClass(obj, Point.class);