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:
  • Field Details

    • LANGUAGES_PATTERN

      public static final String LANGUAGES_PATTERN
      Pattern used to identify allowed languages.
      Since:
      4.0
      See Also:
  • Method Details

    • valueOf

      @Contract("null -> null") public static LanguageAbbreviation valueOf(String string)
      Create an instance from String.
      Fulfills the ValueOfContractor marker.
      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

      @NotNull public static @NotNull LanguageAbbreviation fallback()
      Convenience method to return the wildcard abbreviation.
      Returns:
      The wild one.
      Since:
      4.0