Class IntBuilder

java.lang.Object
rs.baselib.test.IntBuilder
All Implemented Interfaces:
Builder<Integer>

public class IntBuilder extends Object implements Builder<Integer>
An Integer builder.
Author:
ralph
  • Constructor Details

    • IntBuilder

      public IntBuilder()
      Constructor.
  • Method Details

    • withStart

      public IntBuilder withStart(int start)
      Start the build with a given integer.
      Parameters:
      start - - the first number to produce
      Returns:
      this builder for concatenation
    • withOffset

      public IntBuilder withOffset(int offset)
      Set a given increment/decrement for each build.
      Parameters:
      offset - - the increment/decrement to use
      Returns:
      this builder for concatenation
    • withEnd

      public IntBuilder withEnd(int end)
      Set a given max number (for random numbers only).
      Parameters:
      end - - the max number to use
      Returns:
      this builder for concatenation
    • withRandom

      public IntBuilder withRandom()
      Set random creation.
      Returns:
      this builder for concatenation
    • build

      public Integer build()
      Build the previously configured object.
      Specified by:
      build in interface Builder<Integer>
      Returns:
      the built object