# Google Data APIs Client Library (1.43.0)

## 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.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gdata.data.AbstractExtension
`AbstractExtension.AttributesHandler`

Field Summary

Fields inherited from class com.google.gdata.data.ValueConstruct
`attrName`

Fields inherited from class com.google.gdata.data.AbstractExtension
`localName, namespace`

Constructor Summary
`BoolValueConstruct(java.lang.String nodeName)` Constructs `ValueConstruct` to represent boolean value.

Method Summary
`boolean` `equals(java.lang.Object rhs)` Compares `BoolValueConstruct` objects based on the boolean value that they hold.
`boolean` `getBooleanValue()` Get boolean value.
`int` `hashCode()` Returns hash code which is based on the boolean string representation.
`void` `setBooleanValue(boolean value)` Set boolean value.
`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.

Methods inherited from class com.google.gdata.data.ValueConstruct
`consumeAttributes, generate, getHandler, getValue, hasValue, isRequired, putAttributes, setRequired`

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`

Constructor Detail

### BoolValueConstruct

    public BoolValueConstruct(java.lang.String nodeName)

  Constructs `ValueConstruct` to represent boolean value.

Method Detail

### 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.