Package com.upokecenter.cbor
Enum CBORDateConverter.ConversionType
java.lang.Object
java.lang.Enum<CBORDateConverter.ConversionType>
com.upokecenter.cbor.CBORDateConverter.ConversionType
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CBORDateConverter.ConversionType>,java.lang.constant.Constable
- Enclosing class:
- CBORDateConverter
public static enum CBORDateConverter.ConversionType extends java.lang.Enum<CBORDateConverter.ConversionType>
Conversion type for date-time conversion.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description TaggedNumberFromCBORObject accepts objects with tag 0 (date/time strings) and tag 1 (number of seconds since the start of 1970), and ToCBORObject converts date/time objects to CBOR objects of tag 1.TaggedStringFromCBORObject accepts CBOR objects with tag 0 (date/time strings) and tag 1 (number of seconds since the start of 1970), and ToCBORObject converts date/time objects to CBOR objects of tag 0.UntaggedNumberFromCBORObject accepts untagged CBOR integer or CBOR floating-point objects that give the number of seconds since the start of 1970, and ToCBORObject converts date/time objects (java.util.Date in DotNet, and Date in Java) to such untagged CBOR objects. -
Method Summary
Modifier and Type Method Description static CBORDateConverter.ConversionTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static CBORDateConverter.ConversionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TaggedString
FromCBORObject accepts CBOR objects with tag 0 (date/time strings) and tag 1 (number of seconds since the start of 1970), and ToCBORObject converts date/time objects to CBOR objects of tag 0. -
TaggedNumber
FromCBORObject accepts objects with tag 0 (date/time strings) and tag 1 (number of seconds since the start of 1970), and ToCBORObject converts date/time objects to CBOR objects of tag 1. The ToCBORObject conversion is lossless only if the number of seconds since the start of 1970 can be represented exactly as an integer in the interval [-(2^64), 2^64 - 1] or as a 64-bit floating-point number in the IEEE 754r binary64 format; the conversion is lossy otherwise. The ToCBORObject conversion will throw an exception if the conversion to binary64 results in positive infinity, negative infinity, or not-a-number. -
UntaggedNumber
FromCBORObject accepts untagged CBOR integer or CBOR floating-point objects that give the number of seconds since the start of 1970, and ToCBORObject converts date/time objects (java.util.Date in DotNet, and Date in Java) to such untagged CBOR objects. The ToCBORObject conversion is lossless only if the number of seconds since the start of 1970 can be represented exactly as an integer in the interval [-(2^64), 2^64 - 1] or as a 64-bit floating-point number in the IEEE 754r binary64 format; the conversion is lossy otherwise. The ToCBORObject conversion will throw an exception if the conversion to binary64 results in positive infinity, negative infinity, or not-a-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
-