Class LocalizedString

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.CharSequence, java.lang.Comparable<org.opengis.util.InternationalString>, org.opengis.util.InternationalString

    final class LocalizedString
    extends java.lang.Object
    implements org.opengis.util.InternationalString, java.io.Serializable
    A string in a specific locale. In the current version, the locale is unspecified.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String text
      The localized text.
      (package private) static LocalizedString UNKNOWN
      The "not known" value.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LocalizedString​(java.lang.String text)
      Creates a new international string.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      char charAt​(int index)  
      int compareTo​(org.opengis.util.InternationalString o)  
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      int length()  
      java.lang.CharSequence subSequence​(int start, int end)  
      java.lang.String toString()  
      java.lang.String toString​(java.util.Locale locale)  
      (package private) static LocalizedString wrap​(java.lang.String text)
      Returns the given text as an international string.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.CharSequence

        chars, codePoints
    • Field Detail

      • UNKNOWN

        static final LocalizedString UNKNOWN
        The "not known" value. ISO 19111 requires that we return this string if the scope of a datum or coordinate operation is unknown.
      • text

        private final java.lang.String text
        The localized text.
    • Constructor Detail

      • LocalizedString

        private LocalizedString​(java.lang.String text)
        Creates a new international string.
        Parameters:
        text - the localized text
    • Method Detail

      • wrap

        static LocalizedString wrap​(java.lang.String text)
        Returns the given text as an international string.
        Parameters:
        text - the localized text, or null
        Returns:
        the international string, or null if the given text was null
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.lang.CharSequence
        Specified by:
        toString in interface org.opengis.util.InternationalString
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(java.util.Locale locale)
        Specified by:
        toString in interface org.opengis.util.InternationalString
      • length

        public int length()
        Specified by:
        length in interface java.lang.CharSequence
      • charAt

        public char charAt​(int index)
        Specified by:
        charAt in interface java.lang.CharSequence
      • subSequence

        public java.lang.CharSequence subSequence​(int start,
                                                  int end)
        Specified by:
        subSequence in interface java.lang.CharSequence
      • compareTo

        public int compareTo​(org.opengis.util.InternationalString o)
        Specified by:
        compareTo in interface java.lang.Comparable<org.opengis.util.InternationalString>
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object