Class RsYearBuilder

java.lang.Object
rs.baselib.test.RsYearBuilder
All Implemented Interfaces:
Builder<RsYear>

public class RsYearBuilder
extends java.lang.Object
implements Builder<RsYear>
Builder for RsYear objects.

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

Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    RsYearBuilder()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    RsYear build()
    Build the previously configured object.
    RsYearBuilder withTime​(long timeInMilliseconds)
    Create the year with given time.
    RsYearBuilder withTime​(Builder<java.lang.Long> timeBuilder)
    Create the year with given time builder.
    RsYearBuilder withTimezone​(java.util.TimeZone timezone)
    Create the year with given timezone.
    RsYearBuilder withYear​(int year)
    Create the year with given value.
    RsYearBuilder withYear​(Builder<java.lang.Integer> yearBuilder)
    Create the year with given builder.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • withTime

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

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

      public RsYearBuilder withYear​(int year)
      Create the year with given value.
      Parameters:
      year - - year to be used
      Returns:
      the builder for concatenation
    • withYear

      public RsYearBuilder withYear​(Builder<java.lang.Integer> yearBuilder)
      Create the year with given builder.
      Parameters:
      yearBuilder - - year builder to be used
      Returns:
      the builder for concatenation
    • withTimezone

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

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