Package com.upokecenter.cbor
Enum CBORType
java.lang.Object
java.lang.Enum<CBORType>
com.upokecenter.cbor.CBORType
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CBORType>,java.lang.constant.Constable
public enum CBORType extends java.lang.Enum<CBORType>
Represents a type that a CBOR object can have.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ArrayAn array of CBOR objects.BooleanThe simple values true and false.ByteStringAn array of bytes.FloatingPointA 16-, 32-, or 64-bit binary floating-point number.IntegerAn integer in the interval [-(2^64), 2^64 - 1], or an integer of major type 0 and 1.MapA map of CBOR objects.NumberDeprecated.Since version 4.0, CBORObject.Type no longer returns this value for any CBOR Object - this is a breaking change from earlier versions.SimpleValueA "simple value" other than floating point values, true, and false.TextStringA text string. -
Method Summary
-
Enum Constant Details
-
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
The simple values true and false. -
SimpleValue
A "simple value" other than floating point values, true, and false. -
ByteString
An array of bytes. -
TextString
A text string. -
Array
An array of CBOR objects. -
Map
A map of CBOR objects. -
Integer
An integer in the interval [-(2^64), 2^64 - 1], or an integer of major type 0 and 1. -
FloatingPoint
A 16-, 32-, or 64-bit binary floating-point number.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 namejava.lang.NullPointerException- if the argument is null
-