Class Culture

java.lang.Object
org.midheaven.culture.Culture

public final class Culture extends Object
Represents a Culture by associating a LanguageCode and a CountryCode.
  • Method Details

    • parse

      public static Culture parse(String code)
      Parses the provided value.
      Parameters:
      code - the code value
      Returns:
      the result of parse
    • tryParse

      public static Maybe<Culture> tryParse(String code)
      Performs tryParse.
      Parameters:
      code - the code value
      Returns:
      the result of tryParse
    • languageCode

      public LanguageCode languageCode()
      Performs languageCode.
      Returns:
      the result of languageCode
    • countryCode

      public Maybe<CountryCode> countryCode()
      Returns country Code.
      Returns:
      the result of countryCode
    • toString

      public String toString()
      Returns to String.
      Overrides:
      toString in class Object
      Returns:
      the result of toString
    • toLocale

      public Locale toLocale()
      Returns to Locale.
      Returns:
      the result of toLocale
    • equals

      public boolean equals(Object other)
      Performs equals.
      Overrides:
      equals in class Object
      Parameters:
      other - the other value
      Returns:
      the result of equals
    • hashCode

      public int hashCode()
      Checks whether hash Code.
      Overrides:
      hashCode in class Object
      Returns:
      the result of hashCode