oracle.panama.util
Interface LocalResources


public interface LocalResources

This interface stores the local strings


Method Summary
TypeMethod
 java.util.Locale getCurrentLocale()
          Get the current locale
 java.lang.Object getObject(java.lang.String key)
          Get an object from a local resource.
 java.lang.String getString(java.lang.String key)
          Get the string for a given key
 java.lang.String getString(java.lang.String key, boolean isMissing)
          Get the string for a given key
 java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
          Get the string for a given key
 java.lang.String[] getStringArray(java.lang.String key)
          Get an object from a local resource.
 

Method Detail

getString

public java.lang.String getString(java.lang.String key)
Get the string for a given key
Parameters:
key - the "key" string to the resource in the .properties file
Returns:
the String that corresponds to the key. This may be null if the key was not found.

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultValue)
Get the string for a given key
Parameters:
key - the "key" string to the resource in the .properties file
defaultValue - the return value in case the key is not found.
Returns:
the String that corresponds to the key. If the key was not found - the default value.

getString

public java.lang.String getString(java.lang.String key,
                                  boolean isMissing)
Get the string for a given key
Parameters:
key - the key for the resource bundle
isMissing - if true and the key cannot be found a default message (in English) will be returned
Returns:
the String that corresponds to the key.

getStringArray

public java.lang.String[] getStringArray(java.lang.String key)
Get an object from a local resource.
Convenience method to save casting.
Parameters:
key - see class description.

getObject

public java.lang.Object getObject(java.lang.String key)
Get an object from a local resource.
Parameters:
key - see class description.

getCurrentLocale

public java.util.Locale getCurrentLocale()
Get the current locale
Returns:
the current locale