java.lang.Object
de.powerstat.validation.values.Lastname
- All Implemented Interfaces:
IValueObject
,Comparable<Lastname>
Lastname.
DSGVO relevant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LASTNAME_REGEXP
Lastname regexp. -
lastname
Lastname.
-
-
Constructor Details
-
Lastname
Constructor.- Parameters:
lastname
- Lastname (maximum 40 characters)- Throws:
NullPointerException
- if lastname is nullIllegalArgumentException
- if lastname contains unsupported characters or is to long or short
-
-
Method Details
-
of
Lastname factory.- Parameters:
lastname
- Lastname- Returns:
- Lastname object
-
stringValue
Returns the value of this Lastname as a string.- Specified by:
stringValue
in interfaceIValueObject
- Returns:
- The text value represented by this object after conversion to type string.
-
hashCode
public int hashCode()Calculate hash code. -
equals
Is equal with another object. -
toString
Returns the string representation of this Lastname. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "Lastname[lastname=Hofmann]" -
compareTo
Compare with another object.- Specified by:
compareTo
in interfaceComparable<Lastname>
- Parameters:
obj
- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-