public enum HashidsFeature extends Enum<HashidsFeature>
Hashids.Builder
.
Please note that almost every feature will break the interoperability with the origin algorithm implementation if enabled!
Enum Constant and Description |
---|
ALLOW_HEXADECIMAL_NUMBER_PREFIX
Enables support for the
0x or 0X hexadecimal format prefixes of parameter values passed to the
encodeHex(String) and decodeHex(String) methods. |
EXCEPTION_HANDLING
Enables the handling of exceptions instead of returning empty values when invalid parameters are passed to any public API method.
|
NO_MAX_INTEROP_NUMBER_SIZE
Disables the
maximum number size limit which ensures the interoperability with the origin algorithm implementation
hashids.js and allows the usage of the Java Long maxiumum value . |
Modifier and Type | Field and Description |
---|---|
static EnumSet<HashidsFeature> |
ALL
Enables all features.
|
Modifier and Type | Method and Description |
---|---|
static HashidsFeature |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HashidsFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HashidsFeature ALLOW_HEXADECIMAL_NUMBER_PREFIX
0x
or 0X
hexadecimal format prefixes of parameter values passed to the
encodeHex(String)
and decodeHex(String)
methods.
Please note that this will break the interoperability with the origin algorithm implementation!
public static final HashidsFeature EXCEPTION_HANDLING
Please note that this will break the interoperability with the origin algorithm implementation!
public static final HashidsFeature NO_MAX_INTEROP_NUMBER_SIZE
maximum number size limit
which ensures the interoperability with the origin algorithm implementation
hashids.js and allows the usage of the Java Long maxiumum value
.
Please note that this will break the interoperability with the origin algorithm implementation!
public static final EnumSet<HashidsFeature> ALL
public static HashidsFeature[] values()
for (HashidsFeature c : HashidsFeature.values()) System.out.println(c);
public static HashidsFeature valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2017 Arctic Ice Studio