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.PatternAZ09private static java.util.regex.PatternIOQ-
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 charcheckChar(int remainder)private static booleancheckChecksum(java.lang.CharSequence vin)private static java.lang.StringcountryCode(java.lang.CharSequence wmi)private static intmodelYear(char c)VINParsedResultparse(Result result)Attempts to parse the rawResult's contents as a particular type of information (email, URL, etc.) and return aParsedResultencapsulating the result of parsing.private static intvinCharValue(char c)private static intvinPositionWeight(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:ResultParserAttempts to parse the rawResult's contents as a particular type of information (email, URL, etc.) and return aParsedResultencapsulating the result of parsing.- Specified by:
parsein classResultParser- Parameters:
result- the rawResultto parse- Returns:
ParsedResultencapsulating 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)
-
-