Package com.upokecenter.cbor
Enum CBORType
- java.lang.Object
-
- java.lang.Enum<CBORType>
-
- com.upokecenter.cbor.CBORType
-
-
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CBORTypevalueOf(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.
-
-
-
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 namejava.lang.NullPointerException- if the argument is null
-
-