Class State

  • All Implemented Interfaces:
    java.io.Serializable

    @StableMinor(version="17.0",
                 sinceVersion="10.2")
    public class State
    extends java.lang.Object
    implements java.io.Serializable
    Provides state information.
    Since:
    10.2.0
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.Integer> getGeoNameId()
      Returns an optional geo name identifier.
      java.util.Optional<java.lang.String> getISOCode()
      Returns an optional ISO code that represents this state.
      java.util.Optional<java.lang.String> getName​(java.util.Locale... locales)
      Returns an optional name of this state that is in some of the given locales.
      java.util.Map<java.util.Locale,​java.lang.String> getNames()
      Returns an unmodifiable map of this state names, grouped by locale.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getNames

        public java.util.Map<java.util.Locale,​java.lang.String> getNames()
        Returns an unmodifiable map of this state names, grouped by locale.
        Returns:
        an unmodifiable map of this state names, grouped by locale.
        Since:
        10.2.0
      • getName

        public java.util.Optional<java.lang.String> getName​(java.util.Locale... locales)
        Returns an optional name of this state that is in some of the given locales. The lookup order is the given locales order.
        Parameters:
        locales - the locales.
        Returns:
        an optional name of this state that is in some of the given locales.
        Since:
        10.2.0
      • getISOCode

        public java.util.Optional<java.lang.String> getISOCode()
        Returns an optional ISO code that represents this state.
        Returns:
        an optional ISO code that represents this state.
        Since:
        10.2.0
      • getGeoNameId

        public java.util.Optional<java.lang.Integer> getGeoNameId()
        Returns an optional geo name identifier.
        Returns:
        an optional geo name identifier.
        Since:
        10.2.0