Package com.google.zxing.qrcode.decoder
Enum Mode
- All Implemented Interfaces:
- Serializable,- Comparable<Mode>,- java.lang.constant.Constable
See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which data can be encoded to bits in the QR code standard.
- Author:
- Sean Owen
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionSee GBT 18284-2000; "Hanzi" is a transliteration of this mode name.
- 
Method SummaryModifier 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
- 
HANZISee GBT 18284-2000; "Hanzi" is a transliteration of this mode name.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- 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- Parameters:
- version- version in question
- Returns:
- number of bits used, in this QR Code symbol Version, to encode the count of characters that will follow encoded in this Mode
 
- 
getBitspublic int getBits()
 
-