public final class Name
extends java.lang.Object
Constructor and Description |
---|
Name(java.util.List<java.lang.String> honorifics,
java.lang.String firstName,
java.util.List<java.lang.String> middleNames,
java.lang.String lastName,
java.util.Collection<java.lang.String> generationalSuffixes,
java.util.Collection<java.lang.String> suffixes)
Creates a name with all the specified parameters
|
Name(java.lang.String firstName,
java.util.List<java.lang.String> middleNames,
java.lang.String lastName)
Creates a name with the given parameters
|
Name(java.lang.String firstName,
java.lang.String lastName)
Creates a simple name
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.util.Collection<java.lang.String> |
getAllSuffixes()
Returns the generational and suffixes of the name
|
java.lang.String |
getAllSuffixString()
Returns the well formatted version of the suffixes (including generational suffixes)
|
java.lang.String |
getFirstName()
Gets the first name
|
java.lang.String |
getFullName()
Returns the full name (first, middle, last) without honorifics or suffixes (except generation suffixes)
|
java.util.Collection<java.lang.String> |
getGenerationalSuffixes()
Returns the generational suffixes of the name
|
java.lang.String |
getGenerationalSuffixString()
Returns the well formatted version of the suffixes (including generational suffixes)
|
java.util.List<java.lang.String> |
getHonorifics()
Gets the honorifics used in this name
|
java.lang.String |
getLastName()
Gets the last name
|
java.lang.String |
getMiddleName()
Gets the middle name(s) as a string.
|
java.util.List<java.lang.String> |
getMiddleNames()
Get the middle names
|
java.util.Collection<java.lang.String> |
getSuffixes()
Returns the suffixes of the name
|
java.lang.String |
getSuffixString()
Returns the well formatted version of the suffixes (excluding generational suffixes)
|
int |
hashCode() |
java.lang.String |
toFormattedString()
Returns the well formatted version of the entire name (complete with honorifics and suffixes)
|
java.lang.String |
toString() |
public Name(@Nullable java.lang.String firstName, @Nullable java.lang.String lastName)
firstName
- The first namelastName
- The last namepublic Name(@Nullable java.lang.String firstName, @Nullable java.util.List<java.lang.String> middleNames, @Nullable java.lang.String lastName)
firstName
- The first namemiddleNames
- The middle nameslastName
- The last namepublic Name(@Nullable java.util.List<java.lang.String> honorifics, @Nullable java.lang.String firstName, @Nullable java.util.List<java.lang.String> middleNames, @Nullable java.lang.String lastName, @Nullable java.util.Collection<java.lang.String> generationalSuffixes, @Nullable java.util.Collection<java.lang.String> suffixes)
honorifics
- The honorifics of the name, such as Honorary JudgefirstName
- The first namemiddleNames
- A list, in order, of the middle nameslastName
- The last namegenerationalSuffixes
- The generational suffixes for the namesuffixes
- A collection of suffixes for the name@Nullable public java.lang.String getFirstName()
@Nullable public java.lang.String getLastName()
@NotNull public java.util.List<java.lang.String> getMiddleNames()
@Nullable public java.lang.String getMiddleName()
@NotNull public java.util.Collection<java.lang.String> getGenerationalSuffixes()
@NotNull public java.util.Collection<java.lang.String> getSuffixes()
@NotNull public java.util.Collection<java.lang.String> getAllSuffixes()
@NotNull public java.util.List<java.lang.String> getHonorifics()
@NotNull public java.lang.String getFullName()
@NotNull public java.lang.String getSuffixString()
@NotNull public java.lang.String getGenerationalSuffixString()
@NotNull public java.lang.String getAllSuffixString()
@NotNull public java.lang.String toFormattedString()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object