public interface AddressParser
Modifier and Type | Interface and Description |
---|---|
static class |
AddressParser.ParseHint
An enumeration of hints for parsing.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any open resources in use by the parser
|
Address |
parse(java.lang.String address)
Attempts to parse the string given as an address.
|
Address |
parse(java.lang.String address,
AddressParser.ParseHint... hints)
Attempts to parse the string given as an address.
|
void |
setAutoCloseAfterScrapeEnds(ScrapingSession session)
Tells the data manager to close when the scrape ends.
|
@Nullable Address parse(@NotNull java.lang.String address) throws java.text.ParseException
address
- The string to parse as an addressAddress
from the stringjava.text.ParseException
- If there is an error parsing the address. Not throwing the exception doesn't indicate we know the parse has correct data, but there
are some cases when we know the parsed data is invalid@Nullable Address parse(@NotNull java.lang.String address, @NotNull AddressParser.ParseHint... hints) throws java.text.ParseException
address
- The string to parse as an addresshints
- The hints to use when parsingAddress
from the stringjava.text.ParseException
- If there is an error parsing the address. Not throwing the exception doesn't indicate we know the parse has correct data, but there
are some cases when we know the parsed data is invalidvoid close()
void setAutoCloseAfterScrapeEnds(@NotNull ScrapingSession session)
session
- The scraping session this should use to check for closing on completion