Enum UnsignedOptions.Behavior

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static UnsignedOptions.Behavior valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static UnsignedOptions.Behavior[] 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

      • SAME_BIT_SIGNED

        public static final UnsignedOptions.Behavior SAME_BIT_SIGNED
        Uses the signed primitive with the same bit count.

        If this option is chosen, unsigned types may appear to have negative values when printing or doing math.

        This option is compatible with all types.

      • HIGHER_BIT_SIGNED

        public static final UnsignedOptions.Behavior HIGHER_BIT_SIGNED
        Uses the signed primitive with the next higher bit count.

        If this option is chosen, then all unsigned fields will consume twice as much of the available memory and networking bandwidth.

        This option is incompatible with unsigned 64-bit types. Another option must be chosen for that use case. If provided for 64-bit, then an exception will be thrown.

      • CONVERT_TO_STRING

        public static final UnsignedOptions.Behavior CONVERT_TO_STRING
        Converts the unsigned value to a string representation.

        This will be represented by a Schema.FieldType.STRING in the schema.

        This option is compatible with all types.

      • CONVERT_TO_BIG_DECIMAL

        public static final UnsignedOptions.Behavior CONVERT_TO_BIG_DECIMAL
        Converts the unsigned value to a BigDecimal value.

        This will be represented by a Schema.FieldType.DECIMAL in the schema.

        this option is compatible with all types.

    • Method Detail

      • values

        public static UnsignedOptions.Behavior[] 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 (UnsignedOptions.Behavior c : UnsignedOptions.Behavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UnsignedOptions.Behavior 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