XLatLonShapeLineQuery(String field, QueryRelation queryRelation, Line... lines) { super(field, queryRelation); /** line queries do not support within relations, only intersects and disjoint */ if (queryRelation == QueryRelation.WITHIN) { throw new IllegalArgumentException("LatLonShapeLineQuery does not support " + QueryRelation.WITHIN + " queries"); } if (lines == null) { throw new IllegalArgumentException("lines must not be null"); } if (lines.length == 0) { throw new IllegalArgumentException("lines must not be empty"); } for (int i = 0; i < lines.length; ++i) { if (lines[i] == null) { throw new IllegalArgumentException("line[" + i + "] must not be null"); } else if (lines[i].minLon > lines[i].maxLon) { throw new IllegalArgumentException("LatLonShapeLineQuery does not currently support querying across dateline."); } } this.lines = lines.clone(); this.line2D = Line2D.create(lines); }
public LatLonShapeLineQuery(String field, QueryRelation queryRelation, Line... lines) { super(field, queryRelation); /** line queries do not support within relations, only intersects and disjoint */ if (queryRelation == QueryRelation.WITHIN) { throw new IllegalArgumentException("LatLonShapeLineQuery does not support " + QueryRelation.WITHIN + " queries"); } if (lines == null) { throw new IllegalArgumentException("lines must not be null"); } if (lines.length == 0) { throw new IllegalArgumentException("lines must not be empty"); } for (int i = 0; i < lines.length; ++i) { if (lines[i] == null) { throw new IllegalArgumentException("line[" + i + "] must not be null"); } else if (lines[i].minLon > lines[i].maxLon) { throw new IllegalArgumentException("LatLonShapeLineQuery does not currently support querying across dateline."); } } this.lines = lines.clone(); this.line2D = Line2D.create(lines); }