Package oracle.nosql.driver.values

# Class BooleanValue

java.lang.Object
oracle.nosql.driver.values.FieldValue
oracle.nosql.driver.values.BooleanValue

All Implemented Interfaces:
  `Comparable<FieldValue>`

public abstract class BooleanValue extends FieldValue
A `FieldValue` instance representing a boolean value. Boolean values are singleton final instances and never constructed.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class oracle.nosql.driver.values.FieldValue

  `FieldValue.Type`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(FieldValue other)`
  `boolean`
  `equals(Object other)`
  `static BooleanValue`
  `falseInstance()`
  Returns a singleton instance representing a false BooleanValue
  `static BooleanValue`
  `getInstance(boolean value)`
  Returns a singleton instance representing the boolean value provided.
  `String`
  `getString()`
  Returns a String value for the field.
  `FieldValue.Type`
  `getType()`
  Returns the type of the object
  `abstract boolean`
  `getValue()`
  Returns the boolean value of the field
  `int`
  `hashCode()`
  `long`
  `sizeof()`
  `static BooleanValue`
  `trueInstance()`
  Returns a singleton instance representing a true BooleanValue

  ### Methods inherited from class oracle.nosql.driver.values.FieldValue

  `asArray, asBinary, asBoolean, asDouble, asInteger, asJsonNull, asLong, asMap, asNull, asNumber, asString, asTimestamp, castAsDouble, createFromJson, createFromJson, createFromJson, getBinary, getBoolean, getDouble, getInt, getLong, getNumber, getSerializedSize, getTimestamp, isAnyNull, isArray, isAtomic, isBinary, isBoolean, isDouble, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isString, isTimestamp, toJson, toJson, toString`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### trueInstance

    public static BooleanValue trueInstance()
    Returns a singleton instance representing a true BooleanValue
    Returns:
      the value

  - ### falseInstance

    public static BooleanValue falseInstance()
    Returns a singleton instance representing a false BooleanValue
    Returns:
      the value

  - ### getInstance

    public static BooleanValue getInstance(boolean value)
    Returns a singleton instance representing the boolean value provided.
    Parameters:
      `value` - the value
    Returns:
      the value

  - ### getValue

    public abstract boolean getValue()
    Returns the boolean value of the field
    Returns:
      the value

  - ### getString

    public String getString()
    Description copied from class: `FieldValue`
    Returns a String value for the field. The String value cannot be created for MapValue, ArrayValue and BinaryValue. String values that are coerced use Java rules for representation.
    Overrides:
      `getString` in class `FieldValue`
    Returns:
      a String value

  - ### getType

    public FieldValue.Type getType()
    Description copied from class: `FieldValue`
    Returns the type of the object
    Specified by:
      `getType` in class `FieldValue`
    Returns:
      the type

  - ### compareTo

    public int compareTo(FieldValue other)

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### sizeof

    public long sizeof()