Package org.apache.juneau.http.part
Class BasicDatePart
java.lang.Object
org.apache.juneau.http.part.BasicPart
org.apache.juneau.http.part.BasicDatePart
- All Implemented Interfaces:
- NameValuePair,- Headerable
- 
Constructor SummaryConstructorsConstructorDescriptionBasicDatePart(String name, String value) Constructor.BasicDatePart(String name, ZonedDateTime value) Constructor.BasicDatePart(String name, Supplier<ZonedDateTime> value) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionProvides the ability to perform fluent-style assertions on this part.Returns The part value as aZonedDateTimewrapped in anOptional.getValue()static BasicDatePartof(String name, ZonedDateTime value) Static creator.static BasicDatePartof(String name, Supplier<ZonedDateTime> value) Static creator with delayed value.orElse(ZonedDateTime other) Return the value if present, otherwise returnother .Returns The part value as aZonedDateTime.Methods inherited from class org.apache.juneau.http.part.BasicPartasHeader, assertName, assertValue, canCast, cast, getName, getRawValue, of, ofPair, toString
- 
Constructor Details- 
BasicDatePartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value. Can be- null .
 
- 
BasicDatePartConstructor.- Parameters:
- name- The part name. Must not be- null .
- value- The part value supplier. Can be- null or supply- null .
 
- 
BasicDatePartConstructor.null and empty values are treated asnull . Otherwise parses usingDateTimeFormatter.ISO_DATE_TIME.- Parameters:
- name- The part name. Must not be- null .
- value- The part value. Can be- null .
 
 
- 
- 
Method Details- 
ofStatic creator.- Parameters:
- name- The part name.
- value- The part value.
- Returns:
- A new BasicDatePartobject, ornull if the name or value isnull .
 
- 
ofStatic creator with delayed value.Part value is re-evaluated on each call to NameValuePair.getValue().- Parameters:
- name- The part name.
- value- The part value supplier.
- Returns:
- A new BasicDatePartobject, ornull if the name or supplier isnull .
 
- 
getValue- Specified by:
- getValuein interface- NameValuePair
- Overrides:
- getValuein class- BasicPart
 
- 
asZonedDateTimeReturns The part value as aZonedDateTimewrapped in anOptional.- Returns:
- The part value as a ZonedDateTimewrapped in anOptional. Nevernull .
 
- 
toZonedDateTimeReturns The part value as aZonedDateTime.- Returns:
- The part value as a ZonedDateTime, ornull if the valuenull .
 
- 
assertZonedDateTimeProvides the ability to perform fluent-style assertions on this part.- Returns:
- A new fluent assertion object.
- Throws:
- AssertionError- If assertion failed.
 
- 
orElseReturn the value if present, otherwise returnother .This is a shortened form for calling asZonedDateTime().orElse( .other )- Parameters:
- other- The value to be returned if there is no value present, can be- null .
- Returns:
- The value, if present, otherwise other .
 
 
-