Class LanguageAbbreviation
java.lang.Object
de.espirit.firstspirit.common.text.AbstractTextType<LanguageAbbreviation>
de.espirit.firstspirit.common.text.LanguageAbbreviation
- All Implemented Interfaces:
Lang,ValueOfContractor,Serializable,CharSequence,Comparable<LanguageAbbreviation>
public final class LanguageAbbreviation
extends AbstractTextType<LanguageAbbreviation>
implements Lang
String type replacement for language abbreviations.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.common.text.ValueOfContractor
ValueOfContractor.Invoke -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull LanguageAbbreviationfallback()Convenience method to return the wildcard abbreviation.static LanguageAbbreviationCreate an instance from String.Methods inherited from class de.espirit.firstspirit.common.text.AbstractTextType
charAt, codePointAt, codePointBefore, codePointCount, compareTo, compareTo, compareToIgnoreCase, concat, contains, contentEquals, contentEquals, correlatesTo, endsWith, equals, equalsIgnoreCase, getBytes, getBytes, getBytes, getChars, hashCode, indexOf, indexOf, indexOf, indexOf, intern, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, length, matches, offsetByCodePoints, regionMatches, regionMatches, replace, replace, replaceAll, replaceFirst, split, split, startsWith, startsWith, subSequence, substring, substring, toCharArray, toLowerCase, toLowerCase, toString, toUpperCase, toUpperCase, trimMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
LANGUAGES_PATTERN
Pattern used to identify allowed languages.- Since:
- 4.0
- See Also:
-
-
Method Details
-
valueOf
Create an instance from String.
Fulfills theValueOfContractormarker.- Parameters:
string- The string to create from.- Returns:
- The created instance or
null, iff the given string is null. - Throws:
IllegalArgumentException- If the given string does not match basic criteria for being a language abbreviation.- Since:
- 4.0
-
fallback
Convenience method to return the wildcard abbreviation.- Returns:
- The wild one.
- Since:
- 4.0
-