public static class PartialDate.Builder extends Object
PartialDate class.| Constructor and Description |
|---|
Builder() |
Builder(PartialDate original) |
| Modifier and Type | Method and Description |
|---|---|
PartialDate |
build()
Builds the
PartialDate object. |
PartialDate.Builder |
date(Integer date)
Sets the date component.
|
PartialDate.Builder |
hour(Integer hour)
Sets the hour component.
|
PartialDate.Builder |
minute(Integer minute)
Sets the minute component.
|
PartialDate.Builder |
month(Integer month)
Sets the month component.
|
PartialDate.Builder |
offset(ZoneOffset offset)
Sets the timezone offset.
|
PartialDate.Builder |
second(Integer second)
Sets the second component.
|
PartialDate.Builder |
year(Integer year)
Sets the year component.
|
public Builder()
public Builder(PartialDate original)
original - the partial date to copypublic PartialDate.Builder year(Integer year)
year - the yearpublic PartialDate.Builder month(Integer month)
month - the month (1-12)IllegalArgumentException - if the month is not between 1 and 12
inclusivepublic PartialDate.Builder date(Integer date)
date - the dateIllegalArgumentException - if the date is not between 1 and 31
inclusivepublic PartialDate.Builder hour(Integer hour)
hour - the hourIllegalArgumentException - if the hour is not between 0 and 23
inclusivepublic PartialDate.Builder minute(Integer minute)
minute - the minuteIllegalArgumentException - if the minute is not between 0 and
59 inclusivepublic PartialDate.Builder second(Integer second)
second - the secondIllegalArgumentException - if the second is not between 0 and
59 inclusivepublic PartialDate.Builder offset(ZoneOffset offset)
offset - the offsetpublic PartialDate build()
PartialDate object.PartialDate objectIllegalArgumentException - if the year and date are defined,
but the month is not, or if the hour and second are defined, but the
minute is notCopyright © 2012–2023 Michael Angstadt. All rights reserved.