public static class Duration.Builder extends Object
Duration
objects.Constructor and Description |
---|
Duration.Builder()
Creates a new
Duration builder. |
Duration.Builder(Duration source)
Creates a new
Duration builder. |
Modifier and Type | Method and Description |
---|---|
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.
|
public Duration.Builder()
Duration
builder.public Duration.Builder(Duration source)
Duration
builder.source
- the object to copy frompublic Duration.Builder weeks(Integer weeks)
weeks
- the number of weekspublic Duration.Builder days(Integer days)
days
- the number of dayspublic Duration.Builder hours(Integer hours)
hours
- the number of hourspublic Duration.Builder minutes(Integer minutes)
minutes
- the number of minutespublic Duration.Builder seconds(Integer seconds)
seconds
- the number of secondspublic Duration.Builder prior(boolean prior)
prior
- true to be negative, false not to beCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.