Minor ShapeBuilder cleanup
Remove some auto generated comments and make CoordinateNode ctors package private.
This commit is contained in:
parent
ca9c476d88
commit
4017049bac
|
@ -41,7 +41,7 @@ public class CoordinateNode implements ToXContentObject {
|
||||||
* @param coordinate
|
* @param coordinate
|
||||||
* Coordinate for the Node
|
* Coordinate for the Node
|
||||||
*/
|
*/
|
||||||
protected CoordinateNode(Coordinate coordinate) {
|
CoordinateNode(Coordinate coordinate) {
|
||||||
this.coordinate = coordinate;
|
this.coordinate = coordinate;
|
||||||
this.children = null;
|
this.children = null;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ public class CoordinateNode implements ToXContentObject {
|
||||||
* @param children
|
* @param children
|
||||||
* Children of the Node
|
* Children of the Node
|
||||||
*/
|
*/
|
||||||
protected CoordinateNode(List<CoordinateNode> children) {
|
CoordinateNode(List<CoordinateNode> children) {
|
||||||
this.children = children;
|
this.children = children;
|
||||||
this.coordinate = null;
|
this.coordinate = null;
|
||||||
}
|
}
|
||||||
|
@ -61,10 +61,6 @@ public class CoordinateNode implements ToXContentObject {
|
||||||
return (coordinate == null && (children == null || children.isEmpty()));
|
return (coordinate == null && (children == null || children.isEmpty()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMultiPoint() {
|
|
||||||
return children != null && children.size() > 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||||
if (children == null) {
|
if (children == null) {
|
||||||
|
|
|
@ -25,9 +25,7 @@ import java.io.IOException;
|
||||||
|
|
||||||
import static org.elasticsearch.common.geo.builders.ShapeBuilder.SPATIAL_CONTEXT;
|
import static org.elasticsearch.common.geo.builders.ShapeBuilder.SPATIAL_CONTEXT;
|
||||||
|
|
||||||
/**
|
/** Base class for all geo parsing tests */
|
||||||
* Created by nknize on 9/22/17.
|
|
||||||
*/
|
|
||||||
abstract class BaseGeoParsingTestCase extends ESTestCase {
|
abstract class BaseGeoParsingTestCase extends ESTestCase {
|
||||||
protected static final GeometryFactory GEOMETRY_FACTORY = SPATIAL_CONTEXT.getGeometryFactory();
|
protected static final GeometryFactory GEOMETRY_FACTORY = SPATIAL_CONTEXT.getGeometryFactory();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue