|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TimeOfDayFactory
Factory for creating TimeOfDay objects.
| Method Summary | |
|---|---|
TimeOfDay |
deserialize(String time)
Creates a new TimeOfDay object with time of the given string
serialization, as returned by TimeOfDay.serialize() |
TimeOfDay |
fromInt(int time)
Converts an int, as returned from TimeOfDay.toInt()
to a TimeOfDay object. |
TimeOfDay |
getDefault()
Returns a default time of day: 00:00:00.000 (midnight). |
TimeOfDay |
now()
|
TimeOfDay |
parse(int hour,
int minute,
int second)
Creates a new TimeOfDay object, if possible, from the given
parameters. |
TimeOfDay |
parse(int hour,
int minute,
int second,
int millis)
Creates a new TimeOfDay object, if possible, from the given
parameters. |
TimeOfDay |
parse(String timeOfDay)
Creates a new TimeOfDay object, if possible, from the given
string representation. |
TimeOfDay |
parse(String hour,
String minute,
String second)
Creates a new TimeOfDay object, if possible, from the given
parameters. |
TimeOfDay |
parse(String hour,
String minute,
String second,
String millis)
Creates a new TimeOfDay object, if possible, from the given
parameters. |
TimeOfDay |
utc()
|
| Method Detail |
|---|
TimeOfDay now()
TimeOfDay utc()
TimeOfDay getDefault()
null values.
TimeOfDay deserialize(String time)
throws IllegalArgumentException
TimeOfDay object with time of the given string
serialization, as returned by TimeOfDay.serialize()
time - The string serialization of the time, on the format
hhmmssnnn, where nnn is the
milliseconds.
IllegalArgumentException - If the given string serialization does
not represent a correct time of day.
TimeOfDay parse(String hour,
String minute,
String second)
TimeOfDay object, if possible, from the given
parameters. If the given parameters do not represent a correct time of
day, null is returned. This is the case even if the
parameters are totally wrong (i.e. not number, out of range, null etc
etc) - no exception is ever thrown.
hour - The hour in the range 0-23.minute - The minute in the range 0-59.second - The second in the range 0-59.
null if the provided
parameters do not represent a correct time.
TimeOfDay parse(int hour,
int minute,
int second)
TimeOfDay object, if possible, from the given
parameters. If the given parameters do not represent a correct time of
day, null is returned. This is the case even if the
parameters are totally wrong (i.e. out of range, null etc etc) - no
exception is ever thrown.
hour - The hour in the range 0-23.minute - The minute in the range 0-59.second - The second in the range 0-59.
null if the provided
parameters do not represent a correct time.
TimeOfDay parse(String hour,
String minute,
String second,
String millis)
TimeOfDay object, if possible, from the given
parameters. If the given parameters do not represent a correct time of
day, null is returned. This is the case even if the
parameters are totally wrong (i.e. not number, out of range, null etc
etc) - no exception is ever thrown.
hour - The hour in the range 0-23.minute - The minute in the range 0-59.second - The second in the range 0-59.millis - The millisecond in the range 0-999.
null if the provided
parameters do not represent a correct time.
TimeOfDay parse(int hour,
int minute,
int second,
int millis)
TimeOfDay object, if possible, from the given
parameters. If the given parameters do not represent a correct time of
day, null is returned. This is the case even if the
parameters are totally wrong (i.e. out of range, null etc etc) - no
exception is ever thrown.
hour - The hour in the range 0-23.minute - The minute in the range 0-59.second - The second in the range 0-59.millis - The millisecond in the range 0-999.
null if the provided
parameters do not represent a correct time.TimeOfDay parse(String timeOfDay)
TimeOfDay object, if possible, from the given
string representation. If the given representation do not represent a
correct time of day, null is returned.
If a millisecond value is not provided in the given string representation, the millisecond is set to 0.
timeOfDay - The time, represented as a string on one of the formats
hhmmss, hhmmssnnn,
hh:mm:ss, hh:mm:ss.nnn, where
nnn is the millisecond.
null if the provided
string representation does not represent a correct time of day.
TimeOfDay fromInt(int time)
throws IllegalArgumentException
int, as returned from TimeOfDay.toInt()
to a TimeOfDay object.
time - The int value.
IllegalArgumentException - If the given int value
does not correctly represent a time.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||