public CompleteEdge withAggregateBoundsExtendedUsing(final Rectangle bounds) { if (this.aggregateBounds == null) { this.aggregateBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.aggregateBounds, bounds); return this; }
@Override public Rectangle bounds() { return Rectangle.forLocated(this.atlases); }
@Override public Rectangle bounds() { return Rectangle.forLocated(this.upstream, this.downstream); }
public CompleteNode withAggregateBoundsExtendedUsing(final Rectangle bounds) { if (this.aggregateBounds == null) { this.aggregateBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.aggregateBounds, bounds); return this; }
private void updateBounds(final Rectangle bounds) { if (this.originalBounds == null) { this.originalBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.originalBounds, bounds); }
public CompleteLine withAggregateBoundsExtendedUsing(final Rectangle bounds) { if (this.aggregateBounds == null) { this.aggregateBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.aggregateBounds, bounds); return this; }
@Override public Rectangle bounds() { return Rectangle.forLocated(this.members); }
public CompleteArea withAggregateBoundsExtendedUsing(final Rectangle bounds) { if (this.aggregateBounds == null) { this.aggregateBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.aggregateBounds, bounds); return this; }
public CompleteRelation withAggregateBoundsExtendedUsing(final Rectangle bounds) { if (this.aggregateBounds == null) { this.aggregateBounds = bounds; } this.aggregateBounds = Rectangle.forLocated(this.aggregateBounds, bounds); return this; }
@Override public Rectangle bounds() { return Rectangle.forLocated(this.nodes); }
@Override public synchronized Rectangle bounds() { if (this.bounds == null) { // Stream it to make sure the "Iterable" signature is used here (vs. Located, which // would stack overflow). this.bounds = Rectangle.forLocated(Iterables.stream(this)); } return this.bounds; }
@Override public Rectangle bounds() { // Override the regular bounds() method that only looks at the source return Rectangle.forLocated(nodesAndEdges()); }
/** * Build a {@link Rectangle} that wraps around an array of {@link Located} objects. * * @param locateds * The array of {@link Located} objects * @return The resulting {@link Rectangle} */ public static Rectangle forLocated(final Located... locateds) { return forLocated(Iterables.iterable(locateds)); }
@Override public Rectangle bounds() { if (this.bounds == null) { final Iterable<AtlasEntity> boundedEntities = Iterables.filter(this, entity -> entity.bounds() != null); this.bounds = Rectangle.forLocated(boundedEntities); } return this.bounds; }
@Override public Rectangle bounds() { return Rectangle.forLocated(new MultiIterable<>(this.getShapes())); }
public CompleteEdge withPolyLine(final PolyLine polyLine) { this.polyLine = polyLine; if (this.originalBounds == null) { this.originalBounds = polyLine.bounds(); } this.aggregateBounds = Rectangle.forLocated(this.originalBounds, polyLine.bounds()); return this; }
public CompleteNode withLocation(final Location location) { this.location = location; if (this.originalBounds == null) { this.originalBounds = location.bounds(); } this.aggregateBounds = Rectangle.forLocated(this.originalBounds, location.bounds()); return this; }
public CompleteLine withPolyLine(final PolyLine polyLine) { this.polyLine = polyLine; if (this.originalBounds == null) { this.originalBounds = polyLine.bounds(); } this.aggregateBounds = Rectangle.forLocated(this.originalBounds, polyLine.bounds()); return this; }
public CompletePoint withLocation(final Location location) { this.location = location; if (this.originalBounds == null) { this.originalBounds = location.bounds(); } this.aggregateBounds = Rectangle.forLocated(this.originalBounds, location.bounds()); return this; }
public LocationIterableProperties asGeoJsonBigNode() { final List<Location> locations = new ArrayList<>(); nodes().stream().forEach(node -> locations .addAll(Rectangle.forLocated(node.getLocation()).expand(Distance.meters(2)))); return new LocationIterableProperties(new Polygon(locations), Maps.hashMap("BigNode", String.valueOf(getSource().getIdentifier()))); }