public abstract class ResultParser
extends java.lang.Object
Abstract class representing the result of decoding a barcode, as more than
a String -- as some type of structured data. This might be a subclass which represents
a URL, or an e-mail address. parseResult(Result)
will turn a raw
decoded string into the most appropriate type of structured representation.
Thanks to Jeff Griffin for proposing rewrite of these classes that relies less on exception-based mechanisms during parsing.
构造器和说明 |
---|
ResultParser() |
限定符和类型 | 方法和说明 |
---|---|
abstract ParsedResult |
parse(Result theResult)
Attempts to parse the raw
Result 's contents as a particular type
of information (email, URL, etc.) and return a ParsedResult encapsulating
the result of parsing. |
static ParsedResult |
parseResult(Result theResult) |
public abstract ParsedResult parse(Result theResult)
Result
's contents as a particular type
of information (email, URL, etc.) and return a ParsedResult
encapsulating
the result of parsing.theResult
- the raw Result
to parseParsedResult
encapsulating the parsing resultpublic static ParsedResult parseResult(Result theResult)