Class CBORSimpleValue


  • public class CBORSimpleValue
    extends java.lang.Object
    Simple value object to be used for exposing undefined "simple values" when encountered during parsing. Note that as of Jackson 2.12, this class is not yet used for exposing simple values: instead they are report as JsonToken.VALUE_NUMBER_INTs.

    Simple values left undefined in CBOR 1.0 specification contain values [0 - 19], [32, 255]: other values are not used to represent general simple values. Specifically, values below 0, above 255 or in range [20, 31] (inclusive) are never exposed.

    Values are not guaranteed to be canonicalized, but being immutable may be reused (and in future possible canonicalized if that makes sense).

    Note that it is possible that some of above-mentioned values may be defined to have specific meaning and get reported using some other mechanism.

    Since:
    2.12
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int _value
      Actual numeric value represented.
    • Constructor Summary

      Constructors 
      Constructor Description
      CBORSimpleValue​(int value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getValue()
      Accessor for the simple integer value represented
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _value

        protected final int _value
        Actual numeric value represented. Usually should be in range of [0-19][32-255].
    • Constructor Detail

      • CBORSimpleValue

        public CBORSimpleValue​(int value)
    • Method Detail

      • getValue

        public int getValue()
        Accessor for the simple integer value represented
        Returns:
        Simple integer value this instance represents
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object