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