|
||||||||||
| 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.DateTimeValue
public class DateTimeValue
A value of type date-time. Used to represent a specific day in a given year as well as a
specific time during that day. This differs from DateValue, which represents only a
specific day in a given year.
DateTime is represented internally by a GregorianCalendar. The
calendar is immutable and is kept only for validation of the input.
| Constructor Summary | |
|---|---|
DateTimeValue(com.ibm.icu.util.GregorianCalendar calendar)
Creates a new instance based on the given GregorianCalendar. |
|
DateTimeValue(int year,
int month,
int dayOfMonth,
int hours,
int minutes,
int seconds,
int milliseconds)
Creates a new DateTime value. |
|
| Method Summary | |
|---|---|
int |
compareTo(Value other)
Compares this value to another value of the same type. |
com.ibm.icu.util.GregorianCalendar |
getCalendar()
Returns the internal GregorianCalendar. |
int |
getDayOfMonth()
Returns the day of month. |
int |
getHourOfDay()
Returns the hour of day. |
int |
getMillisecond()
Returns the millisecond. |
int |
getMinute()
Returns the minute. |
int |
getMonth()
Returns the month. |
static DateTimeValue |
getNullValue()
Static method to return the null value (same one for all calls). |
com.ibm.icu.util.Calendar |
getObjectToFormat()
Uses an ibm.icu.text.UFormat instance to format Values. |
int |
getSecond()
Returns the second. |
ValueType |
getType()
Returns the type of this cell. |
int |
getYear()
Returns the year. |
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 DateTimeValue 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 DateTimeValue(int year,
int month,
int dayOfMonth,
int hours,
int minutes,
int seconds,
int milliseconds)
year - The year.month - The month.dayOfMonth - The day of month.hours - The hours.minutes - The minutes.seconds - The seconds.milliseconds - The milliseconds.
java.lang.IllegalArgumentException - Thrown if one of the
parameters is illegal.public DateTimeValue(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: year, month, dayOfMonth, hour, minute, second
and millisecond correspond to the values returned by calendar.get(field)
of the given calendar.
calendar - A Gregorian calendar on which to base this instance.
java.lang.IllegalArgumentException - When calendar time zone is not set
to GMT.| Method Detail |
|---|
public static DateTimeValue getNullValue()
public int getYear()
public int getMonth()
public int getDayOfMonth()
public int getHourOfDay()
public int getMinute()
public int getSecond()
public int getMillisecond()
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()
Value
getObjectToFormat in class Valuepublic com.ibm.icu.util.GregorianCalendar getCalendar()
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 | |||||||||