Class YAMLInt

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

public class YAMLInt extends net.pwall.json.JSONInteger implements YAMLScalar
A YAML integer scalar.
Author:
Peter Wall
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class net.pwall.json.JSONInteger

    ZERO
  • Constructor Summary

    Constructors
    Constructor
    Description
    YAMLInt(int value)
    Construct a YAMLInt with the given value and the default tag.
    YAMLInt(int value, String tag)
    Construct a YAMLInt 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.JSONInteger

    appendJSON, bigDecimalValue, bigIntegerValue, doubleValue, floatValue, getValue, intValue, longValue, toSimpleValue, toString, valueEquals, valueEquals, valueEquals, valueEquals, valueEquals, valueEquals, 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

    • YAMLInt

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

      public YAMLInt(int value)
      Construct a YAMLInt 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.JSONInteger
    • hashCode

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