Class IntBuilder

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

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

    Constructors 
    Constructor Description
    IntBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.lang.Integer build()
    Build the previously configured object.
    IntBuilder withEnd​(int end)
    Set a given max number (for random numbers only).
    IntBuilder withOffset​(int offset)
    Set a given increment/decrement for each build.
    IntBuilder withRandom()
    Set random creation.
    IntBuilder withStart​(int start)
    Start the build with a given integer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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 java.lang.Integer build()
      Build the previously configured object.
      Specified by:
      build in interface Builder<java.lang.Integer>
      Returns:
      the built object