Package com.google.zxing.client.result
Class VINResultParser
- java.lang.Object
-
- com.google.zxing.client.result.ResultParser
-
- com.google.zxing.client.result.VINResultParser
-
public final class VINResultParser extends ResultParser
Detects a result that is likely a vehicle identification number.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
AZ09
private static java.util.regex.Pattern
IOQ
-
Fields inherited from class com.google.zxing.client.result.ResultParser
EMPTY_STR_ARRAY
-
-
Constructor Summary
Constructors Constructor Description VINResultParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static char
checkChar(int remainder)
private static boolean
checkChecksum(java.lang.CharSequence vin)
private static java.lang.String
countryCode(java.lang.CharSequence wmi)
private static int
modelYear(char c)
VINParsedResult
parse(Result result)
Attempts to parse the rawResult
's contents as a particular type of information (email, URL, etc.) and return aParsedResult
encapsulating the result of parsing.private static int
vinCharValue(char c)
private static int
vinPositionWeight(int position)
-
Methods inherited from class com.google.zxing.client.result.ResultParser
getMassagedText, isStringOfDigits, isSubstringOfDigits, matchPrefixedField, matchSinglePrefixedField, maybeAppend, maybeAppend, maybeWrap, parseHexDigit, parseNameValuePairs, parseResult, unescapeBackslash, urlDecode
-
-
-
-
Method Detail
-
parse
public VINParsedResult parse(Result result)
Description copied from class:ResultParser
Attempts to parse the rawResult
's contents as a particular type of information (email, URL, etc.) and return aParsedResult
encapsulating the result of parsing.- Specified by:
parse
in classResultParser
- Parameters:
result
- the rawResult
to parse- Returns:
ParsedResult
encapsulating the parsing result
-
checkChecksum
private static boolean checkChecksum(java.lang.CharSequence vin)
-
vinCharValue
private static int vinCharValue(char c)
-
vinPositionWeight
private static int vinPositionWeight(int position)
-
checkChar
private static char checkChar(int remainder)
-
modelYear
private static int modelYear(char c)
-
countryCode
private static java.lang.String countryCode(java.lang.CharSequence wmi)
-
-