Class RsDayBuilder

java.lang.Object
rs.baselib.test.RsDayBuilder
All Implemented Interfaces:
Builder<RsDay>

public class RsDayBuilder
extends java.lang.Object
implements Builder<RsDay>
Builder for RsDay objects.

The builder always create the current day but can be initialized with a starting time and an offset to be used.

Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    RsDayBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    RsDay build()
    Build the previously configured object.
    RsDayBuilder withTime​(long timeInMilliseconds)
    Create the day with given time.
    RsDayBuilder withTime​(Builder<java.lang.Long> timeBuilder)
    Create the day with given time builder.
    RsDayBuilder withTimezone​(java.util.TimeZone timezone)
    Create the day 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 RsDayBuilder withTime​(long timeInMilliseconds)
      Create the day with given time.
      Parameters:
      timeInMilliseconds - the time to be used for creation (base time)
      Returns:
      the builder for concatenation
    • withTime

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

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

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