org.opengis.util
Interface InternationalString

Show UML class diagram
All Superinterfaces:
CharSequence, Comparable<InternationalString>

public interface InternationalString
extends CharSequence, Comparable<InternationalString>

A string that has been internationalized into several locales. This interface is used as a replacement for the String type whenever an attribute needs to be internationalization capable.

The natural ordering is defined by the lexicographical ordering of strings in the default locale, as returned by toString(). This string also defines the character sequence for this object.

Since:
2.0
See Also:
InternationalString, NameFactory.createInternationalString(Map)
Departure from OGC/ISO specification:
Added this new type in order to distinguish between localizable and non-localizable character strings. Not all character strings should be localizable; for example Well Know Text or code names should probably be language neutral. Since the ISO/OGC UML does not say which character strings are localizable and which ones are not, we have done our own guesses in GeoAPI.

Method Summary
 String toString()
          Returns this string in the default locale.
 String toString(Locale locale)
          Returns this string in the given locale.
 
Methods inherited from interface CharSequence
charAt, length, subSequence
 
Methods inherited from interface Comparable
compareTo
 

Method Detail

toString

String toString(Locale locale)
Returns this string in the given locale. If no string is available in the given locale, then some fallback locale is used. The fallback locale is implementation-dependent, and is not necessarily the same than the default locale used by the toString() method.

Parameters:
locale - The desired locale for the string to be returned.
Returns:
The string in the given locale if available, or in an implementation-dependent fallback locale otherwise.
See Also:
Locale.getDefault(), Locale.ROOT

toString

String toString()
Returns this string in the default locale. The default locale is implementation-dependent. It may be the system default, the root locale or any other locale at implementation choice.

All methods from CharSequence operate on this string. This string is also used as the criterion for natural ordering.

Specified by:
toString in interface CharSequence
Overrides:
toString in class Object
Returns:
The string in the default locale.


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.