Class RsDateBuilder

java.lang.Object
rs.baselib.test.RsDateBuilder
All Implemented Interfaces:
Builder<RsDate>

public class RsDateBuilder
extends java.lang.Object
implements Builder<RsDate>
Builder for RsDate objects.

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

Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    RsDateBuilder()
    Constructor.
  • Method Summary

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

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

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

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