Class YAMLBoolean

java.lang.Object
net.pwall.json.JSONBoolean
net.pwall.yaml.YAMLBoolean
All Implemented Interfaces:
Serializable, net.pwall.json.JSONValue, YAMLNode, YAMLScalar

public class YAMLBoolean extends net.pwall.json.JSONBoolean implements YAMLScalar
A YAML boolean scalar.
Author:
Peter Wall
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final YAMLBoolean
     
    static final YAMLBoolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    YAMLBoolean(boolean value)
    Construct a YAMLBoolean with the given value and the default tag.
    YAMLBoolean(boolean value, String tag)
    Construct a YAMLBoolean with the given value and tag.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    Get the tag of the node.
    int
     
    valueOf(boolean b)
    Get a YAMLBoolean for the given value (avoid creating a new object).

    Methods inherited from class net.pwall.json.JSONBoolean

    appendJSON, booleanValue, getValue, toJSON, toSimpleValue, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.pwall.json.JSONValue

    appendJSON, toJSON, toSimpleValue
  • Field Details

  • Constructor Details

    • YAMLBoolean

      public YAMLBoolean(boolean value, String tag)
      Construct a YAMLBoolean with the given value and tag.
      Parameters:
      value - the value
      tag - the tag
    • YAMLBoolean

      public YAMLBoolean(boolean value)
      Construct a YAMLBoolean with the given value and the default tag.
      Parameters:
      value - the value
  • Method Details

    • getTag

      public String getTag()
      Description copied from interface: YAMLNode
      Get the tag of the node.
      Specified by:
      getTag in interface YAMLNode
      Returns:
      the tag
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class net.pwall.json.JSONBoolean
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class net.pwall.json.JSONBoolean
    • valueOf

      public static YAMLBoolean valueOf(boolean b)
      Get a YAMLBoolean for the given value (avoid creating a new object).
      Parameters:
      b - the value
      Returns:
      the corresponding YAMLBoolean