com.google.gdata.data.webmastertools
Class DateTimeValueConstruct

java.lang.Object
  extended by com.google.gdata.data.AbstractExtension
      extended by com.google.gdata.data.ValueConstruct
          extended by com.google.gdata.data.webmastertools.DateTimeValueConstruct
All Implemented Interfaces:
Extension
Direct Known Subclasses:
MessageEntry.DateExtension, SitemapsEntry.LastDownloaded, SitesEntry.Crawled

public abstract class DateTimeValueConstruct
extends ValueConstruct

GData schema extension describing a node with a DateTime value. The class is abstract, derive from this class and define default constructor which hardcodes the node name.


Constructor Summary
DateTimeValueConstruct(java.lang.String nodeName)
          Constructs ValueConstruct to represent DateTime value.
 
Method Summary
 boolean equals(java.lang.Object rhs)
          Compares DateTimeValueConstruct objects based on the date/time value that they hold.
 DateTime getDateTime()
          Get date/time value.
 int hashCode()
          Returns hash code that is based on the date/time value that the object holds.
 void setDateTime(DateTime value)
          Set date/time value.
 void setValue(java.lang.String value)
          Override ValueConstruct.setValue(String) to validate that supplied value is valid date.
 
Methods inherited from class com.google.gdata.data.ValueConstruct
generate, getHandler, getValue, hasValue, isRequired, putAttributes
 
Methods inherited from class com.google.gdata.data.AbstractExtension
disableStrictValidation, enableStrictValidation, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, setImmutable
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeValueConstruct

public DateTimeValueConstruct(java.lang.String nodeName)
Constructs ValueConstruct to represent DateTime value.

Method Detail

equals

public boolean equals(java.lang.Object rhs)
Compares DateTimeValueConstruct objects based on the date/time value that they hold.

Overrides:
equals in class ValueConstruct

hashCode

public int hashCode()
Returns hash code that is based on the date/time value that the object holds.

Overrides:
hashCode in class ValueConstruct

setValue

public void setValue(java.lang.String value)
Override ValueConstruct.setValue(String) to validate that supplied value is valid date.

Overrides:
setValue in class ValueConstruct
Parameters:
value - new value for the value construct or null to reset.
Throws:
java.lang.NullPointerException - if argument is null.
java.lang.IllegalArgumentException - if argument is not a valid date.

setDateTime

public void setDateTime(DateTime value)
Set date/time value.

Throws:
java.lang.NullPointerException - if argument is null.

getDateTime

public DateTime getDateTime()
Get date/time value.