Class Line.Builder

java.lang.Object
de.bluecolored.bluemap.api.math.Line.Builder
Enclosing class:
Line

public static class Line.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • addPoint

      public Line.Builder addPoint(Vector3d point)
      Adds a point to the end of line.
      Parameters:
      point - the point to be added.
      Returns:
      this builder for chaining
    • addPoints

      public Line.Builder addPoints(Vector3d... points)
      Adds multiple points to the end of line.
      Parameters:
      points - the points to be added.
      Returns:
      this builder for chaining
    • addPoints

      public Line.Builder addPoints(Collection<Vector3d> points)
      Adds multiple points to the end of line.
      Parameters:
      points - the points to be added.
      Returns:
      this builder for chaining
    • build

      public Line build()
      Builds a new Line with the points set in this builder.
      There need to be at least 2 points to build a Line.
      Returns:
      the new Line
      Throws:
      IllegalStateException - if there are less than 2 points added to this builder