Package org.geotools.renderer.i18n
Class Vocabulary
- Object
-
- ResourceBundle
-
- IndexedResourceBundle
-
- Vocabulary
-
public class Vocabulary extends IndexedResourceBundle
Base class for locale-dependent resources. Instances of this class should never been created directly. Use the factory methodgetResources(java.util.Locale)
or use static convenience methods instead.- Since:
- 2.2
- Author:
- Martin Desruisseaux (IRD, Geomatys)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ResourceBundle
ResourceBundle.Control
-
-
Field Summary
-
Fields inherited from class ResourceBundle
parent
-
-
Constructor Summary
Constructors Constructor Description Vocabulary()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
format(int key)
Gets a string for the given key from this resource bundle or one of its parents.static String
format(int key, Object arg0)
Gets a string for the given key are replace all occurence of "{0}" with values ofarg0
.static String
format(int key, Object arg0, Object arg1)
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values ofarg0
,arg1
.static String
format(int key, Object arg0, Object arg1, Object arg2)
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values ofarg0
,arg1
, etc.static InternationalString
formatInternational(int key)
Gets an international string for the given key.static InternationalString
formatInternational(int key, Object arg0)
Gets an international string for the given key.static InternationalString
formatInternational(int key, Object arg0, Object arg1)
Gets an international string for the given key.static InternationalString
formatInternational(int key, Object arg0, Object arg1, Object arg2)
Gets an international string for the given key.static Vocabulary
getResources(Locale locale)
Returns resources in the given locale.-
Methods inherited from class IndexedResourceBundle
format, getKeys, getLabel, getLogRecord, getLogRecord, getLogRecord, getLogRecord, getLogRecord, getMenuLabel, getString, getString, getString, getString, getString, getString, handleGetObject, list, toString
-
Methods inherited from class ResourceBundle
clearCache, clearCache, containsKey, getBaseBundleName, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, handleKeySet, keySet, setParent
-
-
-
-
Method Detail
-
getResources
public static Vocabulary getResources(Locale locale) throws MissingResourceException
Returns resources in the given locale.- Parameters:
locale
- The locale, ornull
for the default locale.- Returns:
- Resources in the given locale.
- Throws:
MissingResourceException
- if resources can't be found.
-
formatInternational
public static InternationalString formatInternational(int key)
Gets an international string for the given key. This method does not check for the key validity. If the key is invalid, then aMissingResourceException
may be thrown when aInternationalString.toString(java.util.Locale)
method is invoked.- Parameters:
key
- The key for the desired string.- Returns:
- An international string for the given key.
-
formatInternational
public static InternationalString formatInternational(int key, Object arg0)
Gets an international string for the given key. This method does not check for the key validity. If the key is invalid, then aMissingResourceException
may be thrown when aInternationalString.toString(java.util.Locale)
method is invoked.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".- Returns:
- An international string for the given key.
-
formatInternational
public static InternationalString formatInternational(int key, Object arg0, Object arg1)
Gets an international string for the given key. This method does not check for the key validity. If the key is invalid, then aMissingResourceException
may be thrown when aInternationalString.toString(java.util.Locale)
method is invoked.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".- Returns:
- An international string for the given key.
-
formatInternational
public static InternationalString formatInternational(int key, Object arg0, Object arg1, Object arg2)
Gets an international string for the given key. This method does not check for the key validity. If the key is invalid, then aMissingResourceException
may be thrown when aInternationalString.toString(java.util.Locale)
method is invoked.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".arg2
- Value to substitute to "{2}".- Returns:
- An international string for the given key.
-
format
public static String format(int key) throws MissingResourceException
Gets a string for the given key from this resource bundle or one of its parents.- Parameters:
key
- The key for the desired string.- Returns:
- The string for the given key.
- Throws:
MissingResourceException
- If no object for the given key can be found.
-
format
public static String format(int key, Object arg0) throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}" with values ofarg0
.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".- Returns:
- The formatted string for the given key.
- Throws:
MissingResourceException
- If no object for the given key can be found.
-
format
public static String format(int key, Object arg0, Object arg1) throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values ofarg0
,arg1
.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".- Returns:
- The formatted string for the given key.
- Throws:
MissingResourceException
- If no object for the given key can be found.
-
format
public static String format(int key, Object arg0, Object arg1, Object arg2) throws MissingResourceException
Gets a string for the given key are replace all occurence of "{0}", "{1}", with values ofarg0
,arg1
, etc.- Parameters:
key
- The key for the desired string.arg0
- Value to substitute to "{0}".arg1
- Value to substitute to "{1}".arg2
- Value to substitute to "{2}".- Returns:
- The formatted string for the given key.
- Throws:
MissingResourceException
- If no object for the given key can be found.
-
-