Package com.google.zxing
Enum DecodeHintType
- All Implemented Interfaces:
Serializable
,Comparable<DecodeHintType>
,java.lang.constant.Constable
Encapsulates a type of hint that a caller may pass to a barcode reader to help it
more quickly or accurately decode it. It is up to implementations to decide what,
if anything, to do with the information that is supplied.
- Author:
- Sean Owen, dswitkin@google.com (Daniel Switkin)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllowed extension lengths for EAN or UPC barcodes.Allowed lengths of encoded data -- reject anything else.If true, also tries to decode as inverted image.Assume Code 39 codes employ a check digit.Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.Specifies what character encoding to use when decoding, where applicable (type String)The caller needs to be notified via callback when a possibleResultPoint
is found.Unspecified, application-specific hint.Image is known to be of one of a few possible formats.Image is a pure monochrome image of a barcode.If true, return the start and end digits in a Codabar barcode instead of stripping them.Spend more time to try to find a barcode; optimize for accuracy, not speed. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
static DecodeHintType
Returns the enum constant of this type with the specified name.static DecodeHintType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
OTHER
Unspecified, application-specific hint. Maps to an unspecifiedObject
. -
PURE_BARCODE
Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; useBoolean.TRUE
. -
POSSIBLE_FORMATS
Image is known to be of one of a few possible formats. Maps to aList
ofBarcodeFormat
s. -
TRY_HARDER
Spend more time to try to find a barcode; optimize for accuracy, not speed. Doesn't matter what it maps to; useBoolean.TRUE
. -
CHARACTER_SET
Specifies what character encoding to use when decoding, where applicable (type String) -
ALLOWED_LENGTHS
Allowed lengths of encoded data -- reject anything else. Maps to anint[]
. -
ASSUME_CODE_39_CHECK_DIGIT
Assume Code 39 codes employ a check digit. Doesn't matter what it maps to; useBoolean.TRUE
. -
ASSUME_GS1
Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; useBoolean.TRUE
. -
RETURN_CODABAR_START_END
If true, return the start and end digits in a Codabar barcode instead of stripping them. They are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them to not be. Doesn't matter what it maps to; useBoolean.TRUE
. -
NEED_RESULT_POINT_CALLBACK
The caller needs to be notified via callback when a possibleResultPoint
is found. Maps to aResultPointCallback
. -
ALLOWED_EAN_EXTENSIONS
Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. Maps to anint[]
of the allowed extension lengths, for example [2], [5], or [2, 5]. If it is optional to have an extension, do not set this hint. If this is set, and a UPC or EAN barcode is found but an extension is not, then no result will be returned at all. -
ALSO_INVERTED
If true, also tries to decode as inverted image. All configured decoders are simply called a second time with an inverted image. Doesn't matter what it maps to; useBoolean.TRUE
.
-
-
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
-
getValueType
-