public class TimeRecord extends RecordWrapper
core::Time record.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HOUR
Property name of hour field.
|
static java.lang.String |
MILLIS
Property name of millis field.
|
static java.lang.String |
MINUTE
Property name of minute field.
|
static java.lang.String |
SECOND
Property name of second field.
|
static java.lang.String |
TIME_TYPE
A full type name of
core::Time. |
static java.lang.String |
TIME_ZONE_OFFSET
Property name of timeZoneOffset field.
|
| Constructor and Description |
|---|
TimeRecord()
Creates a new record wrapper instance with no record holder.
|
TimeRecord(long millisOfDay,
ZoneOffsetRecord timeZoneOffset)
Creates a new record wrapper instance.
|
TimeRecord(RecordHolder holder)
Creates a new record wrapper instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHour()
Returns the hour property.
|
java.time.LocalTime |
getLocalTime()
Returns the local time, ignoring time-zone offset.
|
int |
getMillis()
Returns the millis property.
|
int |
getMinute()
Returns the minute property.
|
int |
getSecond()
Returns the second property.
|
ZoneOffsetRecord |
getTimeZoneOffset()
Returns the time-zone offset.
|
java.lang.String |
getTypeName()
Returns the full type name of the record.
|
TimeRecord |
minus(DurationRecord duration)
Subtracts a given duration from this time, returning a new time object,
as specified in
op:add-dayTimeDuration-to-time
.
|
DurationRecord |
minus(TimeRecord time)
Subtract times and returns a duration.
|
TimeRecord |
plus(DurationRecord duration)
Adds a given duration to this time, returning a new time object,
as specified in
op:add-dayTimeDuration-to-time
.
|
void |
setHour(int hour)
Sets the hour property.
|
void |
setMillis(int millis)
Sets the millis property.
|
void |
setMinute(int minute)
Sets the minute property.
|
void |
setSecond(int second)
Sets the second property.
|
void |
setTimeZoneOffset(RecordHolder zoneOffset)
Sets the time-zone offset.
|
void |
setTimeZoneOffset(ZoneOffsetRecord zoneOffset)
Sets the time-zone offset.
|
long |
toMillisOfDay()
Extracts the time as millis of day.
|
asMap, create, equals, getIntProperty, getProperty, hashCode, holder, isCreated, setIntProperty, setProperty, toCollection, toList, toSet, toString, unwrappublic static final java.lang.String TIME_TYPE
core::Time.public static final java.lang.String HOUR
public static final java.lang.String MINUTE
public static final java.lang.String SECOND
public static final java.lang.String MILLIS
public static final java.lang.String TIME_ZONE_OFFSET
public TimeRecord()
public TimeRecord(RecordHolder holder)
holder - public TimeRecord(long millisOfDay,
ZoneOffsetRecord timeZoneOffset)
millisOfDay - timeZoneOffset - public java.lang.String getTypeName()
IRecordWrappergetTypeName in interface IRecordWrappergetTypeName in class RecordWrapperpublic int getHour()
public void setHour(int hour)
hour - public int getMinute()
public void setMinute(int minute)
minute - public int getSecond()
public void setSecond(int second)
second - public int getMillis()
public void setMillis(int millis)
millis - public ZoneOffsetRecord getTimeZoneOffset()
public void setTimeZoneOffset(ZoneOffsetRecord zoneOffset)
zoneOffset - public void setTimeZoneOffset(RecordHolder zoneOffset)
zoneOffset - public java.time.LocalTime getLocalTime()
public long toMillisOfDay()
24 * 60 * 60 * 1000 - 1public TimeRecord plus(DurationRecord duration)
duration - public TimeRecord minus(DurationRecord duration)
duration - public DurationRecord minus(TimeRecord time)
time - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.