public class PlainTime extends DataObject implements LocaleFormatted, ITime, Intable, Value
| Modifier and Type | Field and Description |
|---|---|
int |
hour
The full 24 hour value, from 0 to 23
|
int |
millis
The full millisecond in the second value, from 0 to 999
|
int |
minute
The full minute in the hour value, from 0 to 59
|
int |
second
The full second in the minute value, from 0 to 59
|
| Constructor and Description |
|---|
PlainTime() |
PlainTime(int hour,
int minute,
int second) |
PlainTime(int hour,
int minute,
int second,
int millisecond) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object other)
Compare this object with another.
|
void |
format(LocaleFormat locale,
CharArray dest) |
String |
format(String format)
Format the PlainTime using the LocaleFormat.format() method.
|
CharArray |
format(String format,
Locale locale,
CharArray dest) |
void |
fromString(char[] src,
int offset,
int length) |
void |
fromString(String s) |
int |
getInt()
Convert this PlainDate into a platform independent int value.
|
PlainTime |
getTime(PlainTime dest) |
int |
hashCode()
Returns a hashCode for the object.
|
void |
makeTimeInvalid()
Set all values to -1.
|
void |
parse(LocaleFormat localeFormat,
char[] chars,
int offset,
int length) |
void |
parse(String toParse,
String format)
Parse the PlainTime using the LocaleFormat.parse() method.
|
void |
setInt(int value)
Retrieve this PlainTime from a platform independent int value.
|
void |
setTime(int hour,
int minute,
int second,
int millis) |
PlainTime |
setToCurrent()
Set the PlainDate to the current date.
|
boolean |
timeIsValid()
Makes sure all values are greater than -1.
|
String |
toString()
Return a String representation of this object.
|
CharArray |
toString(CharArray dest) |
_getFieldType, _getSetField, cache, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getMyFieldList, getNewpublic int hour
public int minute
public int second
public int millis
public PlainTime()
public PlainTime(int hour,
int minute,
int second)
public PlainTime(int hour,
int minute,
int second,
int millisecond)
public String format(String format)
public void parse(String toParse, String format) throws ParseException
toParse - the String to parse.format - the expected format.ParseException - if the format is wrong.public PlainTime setToCurrent()
public boolean timeIsValid()
timeIsValid in interface ITimepublic void makeTimeInvalid()
makeTimeInvalid in interface ITimepublic int getInt()
public void setInt(int value)
public int compareTo(Object other)
ComparablecompareTo in interface ComparablecompareTo in class DataObjectpublic int hashCode()
Objectpublic void setTime(int hour,
int minute,
int second,
int millis)
public void fromString(char[] src,
int offset,
int length)
fromString in interface Stringablepublic CharArray toString(CharArray dest)
toString in interface Stringablepublic String toString()
ObjecttoString in interface StringabletoString in class Objectpublic void fromString(String s)
fromString in interface Stringablepublic void format(LocaleFormat locale, CharArray dest)
format in interface LocaleFormattedpublic void parse(LocaleFormat localeFormat, char[] chars, int offset, int length) throws ParseException
parse in interface LocaleFormattedParseException