public class TimeRecord extends RecordWrapper
core::Time
record.Modifier and Type | Field and Description |
---|---|
static String |
HOUR
Property name of hour field.
|
static String |
MILLIS
Property name of millis field.
|
static String |
MINUTE
Property name of minute field.
|
static String |
SECOND
Property name of second field.
|
static String |
TIME_TYPE
A full type name of
core::Time . |
static 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.
|
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, unwrap
public static final String TIME_TYPE
core::Time
.public static final String HOUR
public static final String MINUTE
public static final String SECOND
public static final String MILLIS
public static final String TIME_ZONE_OFFSET
public TimeRecord()
public TimeRecord(RecordHolder holder)
holder
- public TimeRecord(long millisOfDay, ZoneOffsetRecord timeZoneOffset)
millisOfDay
- timeZoneOffset
- public String getTypeName()
IRecordWrapper
getTypeName
in interface IRecordWrapper
getTypeName
in class RecordWrapper
public 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 - 1
public 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.