ResultParser

abstract class ResultParser

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 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.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun parse(theResult: Result): ParsedResult?

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.