Enum Class CBORType

java.lang.Object
java.lang.Enum<CBORType>
com.upokecenter.cbor.CBORType
All Implemented Interfaces:
Serializable, Comparable<CBORType>, Constable

public enum CBORType extends Enum<CBORType>
Represents a type that a CBOR object can have.
  • Enum Constant Details

    • Number

      @Deprecated public static final CBORType Number
      Deprecated.
      Since version 4.0, CBORObject.Type no longer returns this value for any CBOR Object - this is a breaking change from earlier versions. Instead, use the IsNumber property of CBORObject to determine whether a CBOR Object represents a number, or use the two new CBORType values instead. CBORType.Integer covers CBOR objects representing integers of major type 0 and 1. CBORType.FloatingPoint covers CBOR objects representing 16-, 32-, and 64-bit floating-point numbers. CBORType.Number may be removed in version 5.0 or later.
      This property is no longer used.
    • Boolean

      public static final CBORType Boolean
      The simple values true and false.
    • SimpleValue

      public static final CBORType SimpleValue
      A "simple value" other than floating point values, true, and false.
    • ByteString

      public static final CBORType ByteString
      An array of bytes.
    • TextString

      public static final CBORType TextString
      A text string.
    • Array

      public static final CBORType Array
      An array of CBOR objects.
    • Map

      public static final CBORType Map
      A map of CBOR objects.
    • Integer

      public static final CBORType Integer
      An integer in the interval [-(2^64), 2^64 - 1], or an integer of major type 0 and 1.
    • FloatingPoint

      public static final CBORType FloatingPoint
      A 16-, 32-, or 64-bit binary floating-point number.
  • Method Details

    • values

      public static CBORType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CBORType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null