public class Date extends AbstractDate
| Constructor and Description |
|---|
Date(long epochMilli,
DateType type)
Simple constructor that requires all mandatory fields.
|
Date(String dateString,
DateType type)
Simple constructor that requires all mandatory fields.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getValue()
Returns the date as ISO-8601-compliant String.
|
ZonedDateTime |
getValueAsDateTime()
Retrieves the value as ZonedDateTime, allowing
for subsequent operations such as retrieving the year.
|
int |
hashCode() |
void |
setDate(Instant date)
Changes the date value using an Instant that marks a date.
|
void |
setDate(long epochMilli)
Changes the date value using the amount of milliseconds that passed
from 01/01/1970 00:00:00 until this date.
|
void |
setValue(String stringValue)
Tries to set the date by parsing an ISO 8601 compliant String.
|
String |
toString() |
clean, getInformation, getType, setInformationpublic Date(String dateString, DateType type)
dateString - a ISO-8601-compliant date stringtype - the event that is marked by this datepublic Date(long epochMilli,
DateType type)
epochMilli - milliseconds that passed since 01/01/1970 00:00:00type - the event that is marked by this datepublic String getValue()
getValue in class AbstractDatepublic ZonedDateTime getValueAsDateTime()
public void setValue(String stringValue)
setValue in class AbstractDatestringValue - the String that is to be parsedpublic void setDate(long epochMilli)
epochMilli - the amount of milliseconds between 01/01/1970 00:00:00 and this datepublic void setDate(Instant date)
date - an Instant that represents the new datepublic boolean equals(Object o)
equals in class AbstractDateprotected boolean canEqual(Object other)
canEqual in class AbstractDatepublic int hashCode()
hashCode in class AbstractDatepublic String toString()
toString in class AbstractDateCopyright © 2017–2019. All rights reserved.