java.lang.Object
de.powerstat.validation.values.Neighbourhood
- All Implemented Interfaces:
IValueObject,Comparable<Neighbourhood>
Address Neighbourhood.
Not DSGVO relevant.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Neighbourhood obj) Compare with another object.booleanIs equal with another object.inthashCode()Calculate hash code.static NeighbourhoodNeighbourhood factory.Returns the value of this Neighbourhood as a string.toString()Returns the string representation of this Neighbourhood.
-
Field Details
-
NEIGHBOURHOOD_REGEXP
Neighbourhood fregexp. -
neighbourhood
Neighbourhood.
-
-
Constructor Details
-
Neighbourhood
Constructor.- Parameters:
neighbourhood- Neighbourhood- Throws:
NullPointerException- if neighbourhood is nullIllegalArgumentException- if neighbourhood is not a correct neighbourhood
-
-
Method Details
-
of
Neighbourhood factory.- Parameters:
neighbourhood- Neighbourhood- Returns:
- Neighbourhood object
-
stringValue
Returns the value of this Neighbourhood as a string.- Specified by:
stringValuein 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 Neighbourhood. The exact details of this representation are unspecified and subject to change, but the following may be regarded as typical: "Neighbourhood[neighbourhood=...]" -
compareTo
Compare with another object.- Specified by:
compareToin interfaceComparable<Neighbourhood>- Parameters:
obj- Object to compare with- Returns:
- 0: equal; 1: greater; -1: smaller
- See Also:
-