public class AtomizedLocalDateTime extends Object
AtomizedLocalDate
AtomizedLocalDateTime is a simple immutable class to hold local date and time data from a
TemporalAccessor
.
Thread-Safe, immutable class.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static AtomizedLocalDateTime |
fromTemporalAccessor(TemporalAccessor temporalAccessor)
Build a new instance of
AtomizedLocalDateTime based on a TemporalAccessor . |
Integer |
getDay() |
Integer |
getHour() |
Integer |
getMillisecond() |
Integer |
getMinute() |
Integer |
getMonth() |
int |
getResolution()
Get the resolution of the
AtomizedLocalDateTime . |
Integer |
getSecond() |
Integer |
getYear() |
int |
hashCode() |
String |
toString() |
public Integer getMillisecond()
public int getResolution()
AtomizedLocalDateTime
.
Resolution represents the number of parts this date/time contains.
Be aware that it is not possible to express partial time which means that the lowest
resolution possible if 4 (Time with no date)public static AtomizedLocalDateTime fromTemporalAccessor(TemporalAccessor temporalAccessor)
AtomizedLocalDateTime
based on a TemporalAccessor
.
This is done by extracting the ChronoField
.
Please note this expected behavior: if a least 1 time component is available on the TemporalAccessor, the other
time components will return 0 instead of null if they are not provided.
AtomizedLocalDateTime.fromTemporalAccessor(LocalTime.of(HOUR, MINUTE) will return 0 as second and millisecond and
the resolution will be 4.Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.