public static final class Bounds2D.Builder extends Object
Bounds2D
instances.Modifier and Type | Method and Description |
---|---|
Bounds2D.Builder |
add(Bounds2D bounds)
Add the min and max points from the given bounds to this instance.
|
Bounds2D.Builder |
add(Vector2D pt)
Add a point to this instance.
|
Bounds2D.Builder |
addAll(Iterable<? extends Vector2D> pts)
Add a collection of points to this instance.
|
Bounds2D |
build()
Create a new
Bounds2D instance from the values in this builder. |
boolean |
hasBounds()
Return true if this builder contains valid min and max coordinate values.
|
public Bounds2D.Builder add(Vector2D pt)
pt
- point to addpublic Bounds2D.Builder addAll(Iterable<? extends Vector2D> pts)
pts
- points to addpublic Bounds2D.Builder add(Bounds2D bounds)
bounds
- bounds containing the min and max points to addpublic boolean hasBounds()
public Bounds2D build()
Bounds2D
instance from the values in this builder.
The builder can continue to be used to create other instances.IllegalStateException
- if no points were given to the builder or any of the computed
min and max coordinate values are NaN or infinitehasBounds()
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.