public static class USAddressParser.USAddressParserBuilder
extends java.lang.Object
USAddressParser
Constructor and Description |
---|
USAddressParserBuilder()
Creates the builder used to customize what values are parsed
|
Modifier and Type | Method and Description |
---|---|
USAddressParser.USAddressParserBuilder |
addMissingInformation(boolean addMissingInformation)
Sets whether the parser should add missing information if found.
|
USAddressParser.USAddressParserBuilder |
appendCountryWords(java.util.Collection<java.lang.String> countryWords)
Appends a new collection of accepted countries, as regular expressions
|
USAddressParser.USAddressParserBuilder |
appendEndAddressWords(java.util.Collection<java.lang.String> endAddressWords)
Appends a new collection of end address words used to detect the end of the street.
|
USAddressParser.USAddressParserBuilder |
appendSecondaryAddressLineWords(java.util.Collection<java.lang.String> secondaryAddressLineWords)
Appends to the secondary address line words, as regular expressions, to indicate what forms a secondary address
|
USAddressParser.USAddressParserBuilder |
appendStateWords(java.util.Collection<java.lang.String> stateWords)
Appends a new collection of accepted states, as regular expressions
|
USAddressParser |
build()
Creates an instance of the built type using the values currently set in the builder
|
USAddressParser.USAddressParserBuilder |
countryWords(java.util.Collection<java.lang.String> countryWords)
Sets a new collection of accepted countries, as regular expressions
|
USAddressParser.USAddressParserBuilder |
endAddressWords(java.util.Collection<java.lang.String> endAddressWords)
Sets a new collection of end address words used to detect the end of the street.
|
USAddressParser.USAddressParserBuilder |
lookUpDataSource(javax.sql.DataSource lookUpDataSource)
Sets whether the parses uses a lookup system to get more accurate results.
|
USAddressParser.USAddressParserBuilder |
secondaryAddressLineWords(java.util.Collection<java.lang.String> secondaryAddressLineWords)
Sets the secondary address line words, as regular expressions, to indicate what forms a secondary address
|
USAddressParser.USAddressParserBuilder |
stateWords(java.util.Collection<java.lang.String> stateWords)
Sets a new collection of accepted states, as regular expressions
|
java.lang.String |
toString() |
USAddressParser.USAddressParserBuilder |
zipCodePattern(java.lang.String zipCodePattern)
Sets the zip code pattern that will be applied to find zipcodes at the end of an address string
|
public USAddressParserBuilder()
@NotNull public USAddressParser.USAddressParserBuilder endAddressWords(@NotNull java.util.Collection<java.lang.String> endAddressWords)
endAddressWords
- A collection of new end address words, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder appendEndAddressWords(@NotNull java.util.Collection<java.lang.String> endAddressWords)
endAddressWords
- A collection of new end address words, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder secondaryAddressLineWords(@NotNull java.util.Collection<java.lang.String> secondaryAddressLineWords)
secondaryAddressLineWords
- The collections of new regular expressions to match for secondary address lines@NotNull public USAddressParser.USAddressParserBuilder appendSecondaryAddressLineWords(@NotNull java.util.Collection<java.lang.String> secondaryAddressLineWords)
secondaryAddressLineWords
- The collections of new regular expressions to match for secondary address lines@NotNull public USAddressParser.USAddressParserBuilder countryWords(@NotNull java.util.Collection<java.lang.String> countryWords)
countryWords
- A collection of new countries, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder appendCountryWords(@NotNull java.util.Collection<java.lang.String> countryWords)
countryWords
- A collection of new countries, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder stateWords(@NotNull java.util.Collection<java.lang.String> stateWords)
stateWords
- A collection of new states, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder appendStateWords(@NotNull java.util.Collection<java.lang.String> stateWords)
stateWords
- A collection of new states, as regular expressions@NotNull public USAddressParser.USAddressParserBuilder zipCodePattern(@NotNull java.lang.String zipCodePattern)
zipCodePattern
- The zip code pattern to apply@NotNull public USAddressParser.USAddressParserBuilder lookUpDataSource(javax.sql.DataSource lookUpDataSource)
lookUpDataSource
- A non-null value indicates look ups will be performed using the given source. Null indicates not to perform look ups@NotNull public USAddressParser.USAddressParserBuilder addMissingInformation(boolean addMissingInformation)
addMissingInformation
- True to add information obtained through the database, false to only store parsed data@Nullable public USAddressParser build()
java.lang.IllegalStateException
- If the current state of the builder cannot produce a valid object of type T@NotNull public java.lang.String toString()
toString
in class java.lang.Object