Package net.tangly.commons.jmap
Record Class IncompleteLocalDate
java.lang.Object
java.lang.Record
net.tangly.commons.jmap.IncompleteLocalDate
- Record Components:
year
- year of the date if defined otherwise 0month
- month of the date if defined otherwise 0day
- day in the month of the deate if defined otherwise 0
Models an incomplete local date such as a birthday. Incomplete dates are defined, for example, in the VCard standard.
-
Constructor Summary
ConstructorDescriptionIncompleteLocalDate
(int year, int month, int day) Creates an instance of aIncompleteLocalDate
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
day()
Returns the value of theday
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
hasDay()
final int
hashCode()
Returns a hash code value for this object.boolean
hasMonth()
boolean
hasYear()
int
month()
Returns the value of themonth
record component.static IncompleteLocalDate
of
(int year, int month, int day) static IncompleteLocalDate
toDate()
final String
toString()
Returns a string representation of this record class.toYear()
int
year()
Returns the value of theyear
record component.
-
Constructor Details
-
IncompleteLocalDate
-
-
Method Details
-
of
-
of
-
hasYear
public boolean hasYear() -
hasMonth
public boolean hasMonth() -
hasDay
public boolean hasDay() -
toYear
-
toYearMonth
-
toMonthDay
-
toDate
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
year
-
month
-
day
-