Make addPoints in Shape and List accept a collection of points as well
This commit is contained in:
parent
7776c8e979
commit
f398e7ab2b
|
@ -160,6 +160,16 @@ public class Line {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds multiple points to the end of line.
|
||||
* @param points the points to be added.
|
||||
* @return this builder for chaining
|
||||
*/
|
||||
public Builder addPoints(Collection<Vector3d> points) {
|
||||
this.points.addAll(points);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a new {@link Line} with the points set in this builder.<br>
|
||||
* There need to be at least 2 points to build a {@link Line}.
|
||||
|
|
|
@ -248,6 +248,16 @@ public class Shape {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds multiple points to the end of line.
|
||||
* @param points the points to be added.
|
||||
* @return this builder for chaining
|
||||
*/
|
||||
public Builder addPoints(Collection<Vector2d> points) {
|
||||
this.points.addAll(points);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a new {@link Shape} with the points set in this builder.<br>
|
||||
* There need to be at least 3 points to build a {@link Shape}.
|
||||
|
|
Loading…
Reference in New Issue