Package de.bluecolored.bluemap.api.math
Class Shape.Builder
java.lang.Object
de.bluecolored.bluemap.api.math.Shape.Builder
- Enclosing class:
- Shape
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a point to the end of line.Adds multiple points to the end of line.addPoints
(Collection<Vector2d> points) Adds multiple points to the end of line.build()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addPoint
Adds a point to the end of line.- Parameters:
point
- the point to be added.- Returns:
- this builder for chaining
-
addPoints
Adds multiple points to the end of line.- Parameters:
points
- the points to be added.- Returns:
- this builder for chaining
-
addPoints
Adds multiple points to the end of line.- Parameters:
points
- the points to be added.- Returns:
- this builder for chaining
-
build
Builds a newShape
with the points set in this builder.
There need to be at least 3 points to build aShape
.- Returns:
- the new
Shape
- Throws:
IllegalStateException
- if there are less than 3 points added to this builder
-