biweekly.util
Class Duration.Builder

java.lang.Object
  extended by biweekly.util.Duration.Builder
Enclosing class:
Duration

public static class Duration.Builder
extends Object

Builds Duration objects.


Constructor Summary
Duration.Builder()
          Creates a new Duration builder.
Duration.Builder(Duration source)
          Creates a new Duration builder.
 
Method Summary
 Duration build()
          Builds the final Duration object.
 Duration.Builder days(Integer days)
          Sets the number of days
 Duration.Builder hours(Integer hours)
          Sets the number of hours
 Duration.Builder minutes(Integer minutes)
          Sets the number of minutes
 Duration.Builder prior(boolean prior)
          Sets whether the duration should be negative.
 Duration.Builder seconds(Integer seconds)
          Sets the number of seconds.
 Duration.Builder weeks(Integer weeks)
          Sets the number of weeks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Duration.Builder

public Duration.Builder()
Creates a new Duration builder.


Duration.Builder

public Duration.Builder(Duration source)
Creates a new Duration builder.

Parameters:
source - the object to copy from
Method Detail

weeks

public Duration.Builder weeks(Integer weeks)
Sets the number of weeks.

Parameters:
weeks - the number of weeks
Returns:
this

days

public Duration.Builder days(Integer days)
Sets the number of days

Parameters:
days - the number of days
Returns:
this

hours

public Duration.Builder hours(Integer hours)
Sets the number of hours

Parameters:
hours - the number of hours
Returns:
this

minutes

public Duration.Builder minutes(Integer minutes)
Sets the number of minutes

Parameters:
minutes - the number of minutes
Returns:
this

seconds

public Duration.Builder seconds(Integer seconds)
Sets the number of seconds.

Parameters:
seconds - the number of seconds
Returns:
this

prior

public Duration.Builder prior(boolean prior)
Sets whether the duration should be negative.

Parameters:
prior - true to be negative, false not to be
Returns:
this

build

public Duration build()
Builds the final Duration object.

Returns:
the object


Copyright © 2013 Michael Angstadt. All Rights Reserved.