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

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    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.
    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.
    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.
  • Method Summary

    Modifier and Type Method Description
    static CBORDateConverter.ConversionType valueOf​(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.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

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

    • TaggedString

      public static final CBORDateConverter.ConversionType 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

      public static final CBORDateConverter.ConversionType 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

      public static final CBORDateConverter.ConversionType 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

      public static CBORDateConverter.ConversionType[] 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

      public static CBORDateConverter.ConversionType 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