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