Class LongBuilder

java.lang.Object
rs.baselib.test.LongBuilder
All Implemented Interfaces:
Builder<Long>

public class LongBuilder extends Object implements Builder<Long>
A Long builder.
Author:
ralph
  • Constructor Details

    • LongBuilder

      public LongBuilder()
      Constructor.
  • Method Details

    • withStart

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

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

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

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

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