Google Data APIs Client Library (1.41.1)
com.google.gdata.data.webmastertools
Class BoolValueConstruct
java.lang.Object
com.google.gdata.data.AbstractExtension
com.google.gdata.data.ValueConstruct
com.google.gdata.data.webmastertools.BoolValueConstruct
- All Implemented Interfaces:
- Extension
- Direct Known Subclasses:
- MessageEntry.ReadExtension, SitesEntry.EnhancedImageSearch, SitesEntry.Indexed, SitesEntry.Verified
public abstract class BoolValueConstruct
- extends ValueConstruct
GData schema extension describing a node with a boolean value. The class is
abstract, derive from this class and define default constructor which
hardcodes the node name.
Methods inherited from class com.google.gdata.data.AbstractExtension |
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
BoolValueConstruct
public BoolValueConstruct(java.lang.String nodeName)
- Constructs
ValueConstruct
to represent boolean value.
equals
public boolean equals(java.lang.Object rhs)
- Compares
BoolValueConstruct
objects based on the boolean value
that they hold.
- Overrides:
equals
in class ValueConstruct
hashCode
public int hashCode()
- Returns hash code which is based on the boolean string representation.
- Overrides:
hashCode
in class ValueConstruct
setValue
public void setValue(java.lang.String value)
- Override
ValueConstruct.setValue(String)
to validate that
supplied value is xsd:boolean which is a standard way to represent boolean
in XML. xsd:boolean treats "true" and "1" as true and "false" and "0" as
false.
- Overrides:
setValue
in class ValueConstruct
- Parameters:
value
- new value for the value construct or null
to reset.
- Throws:
java.lang.NullPointerException
- if the value is null.
java.lang.IllegalArgumentException
- if value is not valid xsd:boolean value.
setBooleanValue
public void setBooleanValue(boolean value)
- Set boolean value.
getBooleanValue
public boolean getBooleanValue()
- Get boolean value.