public static class EnglishNameParser.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Initialize the builder
|
Modifier and Type | Method and Description |
---|---|
EnglishNameParser.Builder |
appendGenerationalSuffixes(java.util.Collection<java.lang.String> generationalSuffixes)
Adds to the current set of generational suffixes that this will parser will look for
|
EnglishNameParser.Builder |
appendHonorifics(java.util.Collection<java.lang.String> honorifics)
Adds to the current set of honorifics that this will parser will look for
|
EnglishNameParser.Builder |
appendLastNamePrepends(java.util.Collection<java.lang.String> lastNamePrepends)
Adds to the current set of last name prepends (De d' etc...) that this will parser will look for
|
EnglishNameParser.Builder |
appendSuffixes(java.util.Collection<java.lang.String> suffixes)
Adds to the current set of suffixes that this will parser will look for
|
EnglishNameParser.Builder |
blackListRegex(java.util.Set<java.util.regex.Pattern> blackListRegex)
Sets the black list regular expressions
|
EnglishNameParser |
build() |
EnglishNameParser.Builder |
generationalSuffixes(java.util.Collection<java.lang.String> generationalSuffixes)
Sets the set of generational suffixes that this will parser will look for
|
EnglishNameParser.Builder |
honorifics(java.util.Collection<java.lang.String> honorifics)
Sets the set of honorifics that this will parser will look for
|
EnglishNameParser.Builder |
lastNamePrepends(java.util.Collection<java.lang.String> lastNamePrepends)
Sets the set of last name prepends (De d' etc...) that this will parser will look for
|
EnglishNameParser.Builder |
removeRegex(java.lang.String removeRegex)
Sets the regular expression that will be replaced with an empty string in all name pieces
|
EnglishNameParser.Builder |
suffixes(java.util.Collection<java.lang.String> suffixes)
Sets the set of suffixes that this will parser will look for
|
java.lang.String |
toString() |
EnglishNameParser.Builder |
whiteListRegex(java.util.Set<java.util.regex.Pattern> whiteListRegex)
Sets the white list regular expressions
|
@NotNull public EnglishNameParser.Builder removeRegex(@NotNull java.lang.String removeRegex)
removeRegex
- The regular expression to remove@NotNull public EnglishNameParser.Builder suffixes(@NotNull java.util.Collection<java.lang.String> suffixes)
suffixes
- The set of suffixes to check for@NotNull public EnglishNameParser.Builder appendSuffixes(@NotNull java.util.Collection<java.lang.String> suffixes)
suffixes
- The additional suffixes to check for@NotNull public EnglishNameParser.Builder generationalSuffixes(@NotNull java.util.Collection<java.lang.String> generationalSuffixes)
generationalSuffixes
- The set of generational suffixes to check for@NotNull public EnglishNameParser.Builder appendGenerationalSuffixes(@NotNull java.util.Collection<java.lang.String> generationalSuffixes)
generationalSuffixes
- The additional generational suffixes to check for@NotNull public EnglishNameParser.Builder honorifics(@NotNull java.util.Collection<java.lang.String> honorifics)
honorifics
- The set of honorifics to check for@NotNull public EnglishNameParser.Builder appendHonorifics(@NotNull java.util.Collection<java.lang.String> honorifics)
honorifics
- The additional honorifics to check for@NotNull public EnglishNameParser.Builder lastNamePrepends(@NotNull java.util.Collection<java.lang.String> lastNamePrepends)
lastNamePrepends
- The set of last name prepends to check for@NotNull public EnglishNameParser.Builder appendLastNamePrepends(@NotNull java.util.Collection<java.lang.String> lastNamePrepends)
lastNamePrepends
- The additional last name prepends to check for@NotNull public EnglishNameParser.Builder blackListRegex(@NotNull java.util.Set<java.util.regex.Pattern> blackListRegex)
blackListRegex
- A set of regular expressions for black list checks@NotNull public EnglishNameParser.Builder whiteListRegex(@NotNull java.util.Set<java.util.regex.Pattern> whiteListRegex)
whiteListRegex
- A set of regular expressions for white list checks@NotNull public EnglishNameParser build()
@NotNull public java.lang.String toString()
toString
in class java.lang.Object