java.lang.Object
de.powerstat.validation.values.District
- All Implemented Interfaces:
IValueObject
,Comparable<District>
Address District.
Not DSGVO relevant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DISTRICT_REGEXP
District egexp. -
district
District.
-
-
Constructor Details
-
District
Constructor.- Parameters:
district
- District name- Throws:
NullPointerException
- if district is nullIllegalArgumentException
- if district is not a correct district name
-
-
Method Details
-
of
District factory.- Parameters:
district
- District- Returns:
- District object
-
stringValue
Returns the value of this District 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 District. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "District[district=9]" -
compareTo
Compare with another object.- Specified by:
compareTo
in interfaceComparable<District>
- Parameters:
obj
- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-