You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kw...@apache.org on 2017/09/23 08:01:43 UTC

lucene-solr:branch_7x: LUCENE-7970: Separate bounds computation method into its own interface, in prep for creating shapes that can't implement intersects()

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 900b68a6c -> 9c2c4bdb9


LUCENE-7970: Separate bounds computation method into its own interface, in prep for creating shapes that can't implement intersects()


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9c2c4bdb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9c2c4bdb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9c2c4bdb

Branch: refs/heads/branch_7x
Commit: 9c2c4bdb94c2cc7a523eb0d376e71c43f703d691
Parents: 900b68a
Author: Karl Wright <Da...@gmail.com>
Authored: Sat Sep 23 03:59:08 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Sat Sep 23 04:01:29 2017 -0400

----------------------------------------------------------------------
 .../apache/lucene/spatial3d/geom/Bounded.java   | 35 ++++++++++++++++++++
 .../apache/lucene/spatial3d/geom/GeoShape.java  | 10 +-----
 2 files changed, 36 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9c2c4bdb/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Bounded.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Bounded.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Bounded.java
new file mode 100644
index 0000000..59dcc6a
--- /dev/null
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/Bounded.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.spatial3d.geom;
+
+/**
+ * This interface describes methods that determine what the bounds are
+ * for a shape.
+ *
+ * @lucene.experimental
+ */
+public interface Bounded {
+
+  /**
+   * Compute bounds for the shape.
+   *
+   * @param bounds is the input bounds object.
+   *             The input object will be modified.
+   */
+  public void getBounds(final Bounds bounds);
+
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9c2c4bdb/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoShape.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoShape.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoShape.java
index bc2d8f9..5cb07a5 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoShape.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoShape.java
@@ -23,7 +23,7 @@ package org.apache.lucene.spatial3d.geom;
  *
  * @lucene.experimental
  */
-public interface GeoShape extends Membership, PlanetObject {
+public interface GeoShape extends Bounded, Membership, PlanetObject {
 
   /**
    * Return a sample point that is on the outside edge/boundary of the shape.
@@ -53,12 +53,4 @@ public interface GeoShape extends Membership, PlanetObject {
    */
   public boolean intersects(final Plane plane, final GeoPoint[] notablePoints, final Membership... bounds);
 
-  /**
-   * Compute bounds for the shape.
-   *
-   * @param bounds is the input bounds object.
-   *             The input object will be modified.
-   */
-  public void getBounds(final Bounds bounds);
-
 }