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