Enum Mode
- All Implemented Interfaces:
Serializable, Comparable<Mode>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSee GBT 18284-2000; "Hanzi" is a transliteration of this mode name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModeforBits(int bits) intgetBits()intgetCharacterCountBits(Version version) static ModeReturns the enum constant of this type with the specified name.static Mode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TERMINATOR
-
NUMERIC
-
ALPHANUMERIC
-
STRUCTURED_APPEND
-
BYTE
-
ECI
-
KANJI
-
FNC1_FIRST_POSITION
-
FNC1_SECOND_POSITION
-
HANZI
See GBT 18284-2000; "Hanzi" is a transliteration of this mode name.
-
-
Field Details
-
characterCountBitsForVersions
private final int[] characterCountBitsForVersions -
bits
private final int bits
-
-
Constructor Details
-
Mode
private Mode(int[] characterCountBitsForVersions, int bits)
-
-
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forBits
- Parameters:
bits- four bits encoding a QR Code data mode- Returns:
- Mode encoded by these bits
- Throws:
IllegalArgumentException- if bits do not correspond to a known mode
-
getCharacterCountBits
-
getBits
public int getBits()
-