Class YAMLDecimal

java.lang.Object
java.lang.Number
net.pwall.json.JSONNumberValue
net.pwall.json.JSONDecimal
net.pwall.yaml.YAMLDecimal
All Implemented Interfaces:
Serializable, net.pwall.json.JSONValue, YAMLNode, YAMLScalar

public class YAMLDecimal extends net.pwall.json.JSONDecimal implements YAMLScalar
A YAML decimal (float) scalar.
Author:
Peter Wall
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class net.pwall.json.JSONDecimal

    ZERO
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    Get the tag of the node.
    int
     

    Methods inherited from class net.pwall.json.JSONDecimal

    appendJSON, bigDecimalValue, bigIntegerValue, doubleValue, floatValue, getValue, intValue, longValue, toJSON, toSimpleValue, toString, valueEquals, valueEquals, valueEquals, valueEquals, valueEquals, valueEquals, valueOf, valueOf, valueOf, valueOf

    Methods inherited from class java.lang.Number

    byteValue, shortValue

    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

    • YAMLDecimal

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

      public YAMLDecimal(String value)
      Construct a YAMLDecimal 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.JSONDecimal
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class net.pwall.json.JSONDecimal