|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.visualization.datasource.datatable.value.Value
com.google.visualization.datasource.datatable.value.TimeOfDayValue
public class TimeOfDayValue
A value of type time-of-day. Time is represented internally by four fields: hours, minutes, seconds and milliseconds.
| Constructor Summary | |
|---|---|
TimeOfDayValue(com.ibm.icu.util.GregorianCalendar calendar)
Creates a new instance based on the given GregorianCalendar. |
|
TimeOfDayValue(int hours,
int minutes,
int seconds)
Creates a new TimeOfDayValue. |
|
TimeOfDayValue(int hours,
int minutes,
int seconds,
int milliseconds)
Creates a new TimeOfDayValue. |
|
| Method Summary | |
|---|---|
int |
compareTo(Value other)
Compares this value to another value of the same type. |
int |
getHours()
Returns the underlying hours. |
int |
getMilliseconds()
Returns the underlying milliseconds. |
int |
getMinutes()
Returns the underlying minutes. |
static TimeOfDayValue |
getNullValue()
Static method to return the null value (same one for all calls). |
com.ibm.icu.util.Calendar |
getObjectToFormat()
A method to retrieve a formattable object for this object. |
int |
getSeconds()
Returns the underlying seconds. |
ValueType |
getType()
Returns the type of this cell. |
int |
hashCode()
Returns the hashcode of this value. |
protected java.lang.String |
innerToQueryString()
Returns a string that, when parsed by the query parser, should return an identical value. |
boolean |
isNull()
Tests whether this value is a logical null. |
java.lang.String |
toString()
Returns the timeValue as a String using default formatting. |
| Methods inherited from class com.google.visualization.datasource.datatable.value.Value |
|---|
equals, getLocalizedComparator, getNullValueFromValueType, toQueryString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimeOfDayValue(int hours,
int minutes,
int seconds)
hours - The hours.minutes - The minutes.seconds - The seconds.
java.lang.IllegalArgumentException - Thrown when one of the
paramters is illegal.
public TimeOfDayValue(int hours,
int minutes,
int seconds,
int milliseconds)
hours - The hours.minutes - The minutes.seconds - The seconds.milliseconds - The milliseconds.
java.lang.IllegalArgumentException - Thrown when one of the
parameters is illegal.public TimeOfDayValue(com.ibm.icu.util.GregorianCalendar calendar)
GregorianCalendar.
The given calendar's time zone must be set to "GMT" as a precondition to
use this constructor.
Note: The date time values: hour, minute, second and millisecond
correspond to the values returned by calendar.get(field) of the given
calendar.
calendar - A GregorianCalendar from which to extract this instance
values: hour, minutes, seconds and milliseconds.
java.lang.IllegalArgumentException - When calendar time zone is not set
to GMT.| Method Detail |
|---|
public static TimeOfDayValue getNullValue()
public ValueType getType()
Value
getType in class Valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isNull()
isNull in class Valuepublic int compareTo(Value other)
other - Other value.
public int hashCode()
Value
hashCode in class Valuepublic com.ibm.icu.util.Calendar getObjectToFormat()
getObjectToFormat in class Valuepublic int getHours()
NullValueException - Thrown when this Value is NULL_VALUE.public int getMinutes()
NullValueException - Thrown when this Value is NULL_VALUE.public int getSeconds()
NullValueException - Thrown when this Value is NULL_VALUE.public int getMilliseconds()
NullValueException - Thrown when this Value is NULL_VALUE.protected java.lang.String innerToQueryString()
innerToQueryString in class Value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||