Enum CBORType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CBORType>

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

      Enum Constants 
      Enum Constant Description
      Array
      An array of CBOR objects.
      Boolean
      The simple values true and false.
      ByteString
      An array of bytes.
      FloatingPoint
      A 16-, 32-, or 64-bit binary floating-point number.
      Integer
      An integer in the interval [-(2^64), 2^64 - 1], or an integer of major type 0 and 1.
      Map
      A map of CBOR objects.
      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.
      SimpleValue
      A "simple value" other than floating point values, true, and false.
      TextString
      A text string.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CBORType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CBORType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static CBORType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CBORType c : CBORType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CBORType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null