public static enum UnsignedOptions.Behavior extends java.lang.Enum<UnsignedOptions.Behavior>
Enum Constant and Description |
---|
CONVERT_TO_BIG_DECIMAL
Converts the unsigned value to a
BigDecimal value. |
CONVERT_TO_STRING
Converts the unsigned value to a string representation.
|
HIGHER_BIT_SIGNED
Uses the signed primitive with the next higher bit count.
|
SAME_BIT_SIGNED
Uses the signed primitive with the same bit count.
|
Modifier and Type | Method and 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.
|
public static final UnsignedOptions.Behavior SAME_BIT_SIGNED
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.
public static final UnsignedOptions.Behavior HIGHER_BIT_SIGNED
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.
public static final UnsignedOptions.Behavior CONVERT_TO_STRING
This will be represented by a Schema.FieldType.STRING
in the schema.
This option is compatible with all types.
public static final UnsignedOptions.Behavior CONVERT_TO_BIG_DECIMAL
BigDecimal
value.
This will be represented by a Schema.FieldType.DECIMAL
in the schema.
this option is compatible with all types.
public static UnsignedOptions.Behavior[] values()
for (UnsignedOptions.Behavior c : UnsignedOptions.Behavior.values()) System.out.println(c);
public static UnsignedOptions.Behavior valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null