Modifier and Type | Method and Description |
---|---|
static LocalTime |
castOptional(DataValue value)
For internal use only.
|
static LocalTime |
castRequired(DataValue value)
For internal use only.
|
static int |
compare(LocalTime left,
LocalTime right)
Compare two time values.
|
int |
compareTo(LocalTime value)
Compare this time with another time.
|
static boolean |
equal(LocalTime left,
LocalTime right)
Compare two time values.
|
boolean |
equals(java.lang.Object value)
Compare this time value with another time value.
|
static LocalTime |
from(java.time.LocalTime jt)
Convert from java.time.LocalTime.
|
DataType |
getDataType()
Return data type of the wrapped value.
|
int |
getHour()
Return hour field of time (0 to 23).
|
int |
getMinute()
Return minute field of time (0 to 59).
|
int |
getNano()
Return nanosecond field of time (0 to 999999999).
|
int |
getSecond()
Return second field of time (0 to 59).
|
boolean |
greaterEqual(LocalTime value)
Compare this time value with another time value.
|
boolean |
greaterThan(LocalTime value)
Compare this time value with another time value.
|
int |
hashCode()
Hash this data value to a number.
|
boolean |
lessEqual(LocalTime value)
Compare this time value with another time value.
|
boolean |
lessThan(LocalTime value)
Compare this time value with another time value.
|
double |
minus(LocalTime value)
Return the difference
this - value , measured in days. |
boolean |
notEqual(LocalTime value)
Compare this time value with another time value.
|
static LocalTime |
now()
Return the current local time.
|
static LocalTime |
of(int hour,
int minute,
int second)
|
static LocalTime |
of(int hour,
int minute,
int second,
int nano)
Return a new time value.
|
static LocalTime |
parse(java.lang.String text)
|
LocalTime |
plusHours(long hours)
Return a new time which is the specified number of hours ahead of this time.
|
LocalTime |
plusMicros(long micros)
Return a new time which is the specified number of microseconds ahead of this time.
|
LocalTime |
plusMillis(long millis)
Return a new time which is the specified number of milliseconds ahead of this time.
|
LocalTime |
plusMinutes(long minutes)
Return a new time which is the specified number of minutes ahead of this time.
|
LocalTime |
plusNanos(long nanos)
Return a new time which is the specified number of nanoseconds ahead of this time.
|
LocalTime |
plusSeconds(long seconds)
Return a new time which is the specified number of seconds ahead of this time.
|
static boolean |
static_greaterEqual(LocalTime left,
LocalTime right)
Compare two time values.
|
static boolean |
static_greaterThan(LocalTime left,
LocalTime right)
Compare two time values.
|
static boolean |
static_lessEqual(LocalTime left,
LocalTime right)
Compare two time values.
|
static boolean |
static_lessThan(LocalTime left,
LocalTime right)
Compare two time values.
|
static boolean |
static_notEqual(LocalTime left,
LocalTime right)
Compare two time values.
|
java.time.LocalTime |
toJavaTime()
Convert to java.time.LocalTime.
|
java.lang.String |
toString()
Convert this data value to a string.
|
cloneMutable, getTypeCode
public static LocalTime from(java.time.LocalTime jt)
jt
- Java time value.public java.time.LocalTime toJavaTime()
public static LocalTime castOptional(DataValue value)
For internal use only.
value
- (internal use only)public static LocalTime castRequired(DataValue value)
For internal use only.
value
- (internal use only)public static int compare(LocalTime left, LocalTime right)
Compare two time values.
left
- The first time for comparison.right
- The second time for comparison.left < right
, 0 if left == right
, or 1 if left > right
.public int compareTo(LocalTime value)
Compare this time with another time.
value
- The other time.public static boolean equal(LocalTime left, LocalTime right)
Compare two time values.
left
- (nullable) The first time for comparison.right
- (nullable) The second time for comparison.true
if left
is equal to right
, otherwise false
.public boolean equals(java.lang.Object value)
Compare this time value with another time value.
public DataType getDataType()
Return data type of the wrapped value.
getDataType
in class DataValue
public int getHour()
Return hour field of time (0 to 23).
public int getMinute()
Return minute field of time (0 to 59).
public int getNano()
Return nanosecond field of time (0 to 999999999).
public int getSecond()
Return second field of time (0 to 59).
public boolean greaterEqual(LocalTime value)
Compare this time value with another time value.
value
- The other time value.true
if this time value is greater than or equal to the value time value. Oherwise false
.public boolean greaterThan(LocalTime value)
Compare this time value with another time value.
value
- The other time value.true
if this time value is greater than the value time value. Oherwise false
.public int hashCode()
Hash this data value to a number.
public boolean lessEqual(LocalTime value)
Compare this time value with another time value.
value
- The other time value.true
if this time value is less than or equal to the value time value. Oherwise false
.public boolean lessThan(LocalTime value)
Compare this time value with another time value.
value
- The other time value.true
if this time value is less than the value time value. Oherwise false
.public double minus(LocalTime value)
Return the difference this - value
, measured in days.
value
- The other time.this - value
, measured in days.public boolean notEqual(LocalTime value)
Compare this time value with another time value.
value
- The other time value.true
if this time value is not equal to the value time value. Oherwise false
.public static LocalTime now()
Return the current local time.
public static LocalTime of(int hour, int minute, int second)
hour
- Hour parameter.minute
- Minute parameter.second
- Second parameter.public static LocalTime of(int hour, int minute, int second, int nano)
Return a new time value.
hour
- The hour field (0 to 24). If the hour
is 24 then all the other parameters must be 0. This represents a day duration (PT24H).minute
- The minute field (0 to 59).second
- The second field (0 to 59).nano
- The nano field (0 to 999999999).public static LocalTime parse(java.lang.String text)
Return (nullable) Value parsed from XML Schema format, or null
if text
has invalid time format.
text
- Value in XML Schema format.null
if text
has invalid time format.public LocalTime plusHours(long hours)
Return a new time which is the specified number of hours ahead of this time.
hours
- Number of hours to add. Can be negative, zero or positive.public LocalTime plusMicros(long micros)
Return a new time which is the specified number of microseconds ahead of this time.
micros
- Number of microseconds to add. Can be negative, zero or positive.public LocalTime plusMillis(long millis)
Return a new time which is the specified number of milliseconds ahead of this time.
millis
- Number of milliseconds to add. Can be negative, zero or positive.public LocalTime plusMinutes(long minutes)
Return a new time which is the specified number of minutes ahead of this time.
minutes
- Number of minutes to add. Can be negative, zero or positive.public LocalTime plusNanos(long nanos)
Return a new time which is the specified number of nanoseconds ahead of this time.
nanos
- Number of nanoseconds to add. Can be negative, zero or positive.public LocalTime plusSeconds(long seconds)
Return a new time which is the specified number of seconds ahead of this time.
seconds
- Number of seconds to add. Can be negative, zero or positive.public static boolean static_greaterEqual(LocalTime left, LocalTime right)
Compare two time values.
left
- The first time for comparison.right
- The second time for comparison.true
if left
is greater than or equal to right
, otherwise false
.public static boolean static_greaterThan(LocalTime left, LocalTime right)
Compare two time values.
left
- The first time for comparison.right
- The second time for comparison.true
if left
is greater than right
, otherwise false
.public static boolean static_lessEqual(LocalTime left, LocalTime right)
Compare two time values.
left
- The first time for comparison.right
- The second time for comparison.true
if left
is less than or equal to right
, otherwise false
.public static boolean static_lessThan(LocalTime left, LocalTime right)
Compare two time values.
left
- The first time for comparison.right
- The second time for comparison.true
if left
is less than right
, otherwise false
.public static boolean static_notEqual(LocalTime left, LocalTime right)
Compare two time values.
left
- (nullable) The first time for comparison.right
- (nullable) The second time for comparison.true
if left
is not equal to right
, otherwise false
.public java.lang.String toString()
Convert this data value to a string.
If the LocalTime.dataType
is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).