Class RsMonthBuilder

java.lang.Object
rs.baselib.test.RsMonthBuilder
All Implemented Interfaces:
Builder<RsMonth>

public class RsMonthBuilder
extends java.lang.Object
implements Builder<RsMonth>
Builder for RsMonth objects.

The builder always creates the current month but can be initialized with a starting month and an offset to be used.

Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    RsMonthBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    RsMonth build()
    Build the previously configured object.
    RsMonthBuilder withMonthOffset​(int months)
    Create each month with another month offset.
    RsMonthBuilder withTime​(long timeInMilliseconds)
    Create the month with given time.
    RsMonthBuilder withTime​(Builder<java.lang.Long> timeBuilder)
    Create the month with given time builder.
    RsMonthBuilder withTimezone​(java.util.TimeZone timezone)
    Create the month with given timezone.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • withTime

      public RsMonthBuilder withTime​(long timeInMilliseconds)
      Create the month with given time.
      Parameters:
      timeInMilliseconds - the time to be used for creation (base time)
      Returns:
      the builder for concatenation
    • withTime

      public RsMonthBuilder withTime​(Builder<java.lang.Long> timeBuilder)
      Create the month with given time builder.
      Parameters:
      timeBuilder - builder for creating the time
      Returns:
      the builder for concatenation
    • withTimezone

      public RsMonthBuilder withTimezone​(java.util.TimeZone timezone)
      Create the month with given timezone.
      Parameters:
      timezone - timezone to be used
      Returns:
      the builder for concatenation
    • withMonthOffset

      public RsMonthBuilder withMonthOffset​(int months)
      Create each month with another month offset.
      Parameters:
      months - - month offset
      Returns:
      the builder for concatenation
    • build

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