public class Time extends Object
Constructor | Description |
---|---|
Time(Integer hour,
Integer minute,
Integer second,
Integer offset) |
Creates a time with the specified hour, minute and second.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object o) |
|
int |
hashCode() |
|
Integer |
hour() |
|
Integer |
minute() |
|
Integer |
offset() |
|
static Time |
parse(String input) |
Parses a time of day in ISO 8601 format and returns it as a Time object.
|
static Time |
parseInContext(String input,
Time start) |
Parses a time of day in ISO 8601 format and returns it as a Time object.
|
Integer |
second() |
|
String |
toString() |
public Time(Integer hour, Integer minute, Integer second, Integer offset)
The offset specified the number of difference from UTC in number of minutes. The offset may be positive, negative or 0. If the offset is null, then according to ISO 8601 should use local time.
hour
- The hour. May not be null.minute
- The minute. May be null.second
- The second. May be null.offset
- The offset from UTC in minutes. May be null.public static Time parse(String input)
input
- The input string.IllegalArgumentException
- if the input cannot be parsed.public static Time parseInContext(String input, Time start)
The time may omit the larger units, which in such case will be inherited from the start time supplied.
input
- The input string.start
- The start time.Time
object.IllegalArgumentException
- if the input cannot be parsed.public Integer hour()
public Integer minute()
public Integer second()
public Integer offset()
Copyright © 2020 Apptus Technologies AB. All rights reserved.