Class Locale

    • Method Detail

      • country

        public final String country()

        The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.

        Returns:
        The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.
      • subdivision

        public final String subdivision()

        The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.

        Returns:
        The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.
      • serializableBuilderClass

        public static Class<? extends Locale.Builder> serializableBuilderClass()
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)