Class NameBaseType
java.lang.Object
org.projecthusky.common.basetypes.NameBaseType
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Name
A name for a person, organization, place or thing. A sequence of name parts,
such as given name or family name, prefix, suffix, etc.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NameBaseType.Builder
builder()
Creates builder to buildNameBaseType
.boolean
Checks whether the two objects are equal (based on their content).Gets the name delimiter.Gets the family name.Gets the full name.getGiven()
Gets the given name (be careful when calling it "first name" since this given names do not always come first).getName()
Gets the whole name.Gets the nullFlavor.Gets the name prefix.Gets the name suffix.getUsage()
Gets the name usage.int
hashCode()
Hash code.boolean
Checks if the current instance is null flavored.void
setDelimiter
(String delimiter) Sets the name delimiter.void
Sets the family name.void
Sets the given name (be careful when calling it "first name" since this given names do not always come first).void
Gets the whole name.void
setNullFlavor
(NullFlavor nullFlavor) Sets the nullFlavor.void
Sets the name prefix.void
Sets the name suffix.void
setUsage
(EntityNameUse usage) Sets the name usage.toString()
Builds a string of the name.
-
Constructor Details
-
NameBaseType
public NameBaseType()Instantiates a new name base type. Default constructor.
-
-
Method Details
-
builder
Creates builder to buildNameBaseType
.- Returns:
- created builder
-
equals
Checks whether the two objects are equal (based on their content). -
getDelimiter
Gets the name delimiter. A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.- Returns:
- the delimiter
-
setDelimiter
Sets the name delimiter. A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.- Parameters:
delimiter
- the new delimiter
-
getFamily
Gets the family name. This is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.- Returns:
- the family
-
setFamily
Sets the family name. This is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.- Parameters:
family
- the new family
-
getFullName
Gets the full name.- Returns:
- the full name
-
getGiven
Gets the given name (be careful when calling it "first name" since this given names do not always come first).- Returns:
- the given
-
setGiven
Sets the given name (be careful when calling it "first name" since this given names do not always come first).- Parameters:
given
- the new given
-
getName
Gets the whole name. By default, it gets assembled by the different name parts, but if there are none, you may also set this directly.- Returns:
- the name
-
setName
Gets the whole name. By default, it gets assembled by the different name parts, but if there are none, you may also set this directly.- Parameters:
name
- the new name
-
getNullFlavor
Gets the nullFlavor.- Returns:
- the null flavor
-
getPrefix
Gets the name prefix. A prefix has a strong association to the immediately following name part.- Returns:
- the prefix
-
setPrefix
Sets the name prefix. A prefix has a strong association to the immediately following name part.- Parameters:
prefix
- the new prefix
-
getSuffix
Gets the name suffix. A suffix has a strong association to the immediately preceding name part.- Returns:
- the suffix
-
setSuffix
Sets the name suffix. A suffix has a strong association to the immediately preceding name part.- Parameters:
suffix
- the new suffix
-
getUsage
Gets the name usage. Gets the type of usage (legal, artist, pseudonym, ...).- Returns:
- the usage
-
setUsage
Sets the name usage. Gets the type of usage (legal, artist, pseudonym, ...).- Parameters:
usage
- the new usage
-
hashCode
public int hashCode()Hash code. -
isNullFlavor
public boolean isNullFlavor()Checks if the current instance is null flavored.- Returns:
- true, if is null flavor
-
setNullFlavor
Sets the nullFlavor.- Parameters:
nullFlavor
- the new null flavor
-
toString
Builds a string of the name.
-