LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.misc
Class LyStrings

java.lang.Object
  extended by leon.misc.LyResourceBundle
      extended by leon.misc.LyStrings

public class LyStrings
extends LyResourceBundle

This class is used to manage the strings resources of an application. It is based on the mechanism of LyResourceBundle.


Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.misc.LyResourceBundle
PACKAGE_DIR, PROPERTIES_DIR, UPPER_CASE_KEYS_ONLY
 
Constructor Summary
LyStrings(LyEnvironment environment)
          Constructor with a given environment.
LyStrings(LyEnvironment environment, java.lang.String name)
          Constructor with a given environment and name.
LyStrings(LyEnvironment environment, java.lang.String name, java.lang.String skin)
          Constructor with a given environment and name.
 
Method Summary
 int getInt(java.lang.String key)
          Gets the integer corresponding to the given key.
 long getLong(java.lang.String key)
          Returns the long corresponding to the key passed.
 java.lang.Character getMnemonic(java.lang.String key)
          Gets the mnemonic of the string corresponding to the given key.
 java.lang.String getString(java.lang.String key)
          Gets the string corresponding to the given key.
 java.lang.String getString(java.lang.String key, java.lang.Object[] arguments)
          Gets a message formated with the specified arguments corresponding to the given key.
 
Methods inherited from class leon.misc.LyResourceBundle
checkKey, clearCache, free, get, getKeyList, getKeys, getSonEnvironments, hasKey, put, remove, removeBundles, saveTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyStrings

public LyStrings(LyEnvironment environment)
Constructor with a given environment. Calls LyStrings(environment, null) constructor.

Parameters:
environment - The environment of the strings bundle.

LyStrings

public LyStrings(LyEnvironment environment,
                 java.lang.String name)
Constructor with a given environment and name. Calls the LyStrings(environment, name, environment.getLocale()) constructor.

Parameters:
environment - The environment of the strings bundle.
name - The name of the strings bundle.

LyStrings

public LyStrings(LyEnvironment environment,
                 java.lang.String name,
                 java.lang.String skin)
Constructor with a given environment and name. Calls the LyStrings(environment, name, environment.getLocale()) constructor.

Parameters:
environment - The environment of the strings bundle.
name - The name of the strings bundle.
skin - The name of the skin
Method Detail

getString

public java.lang.String getString(java.lang.String key)
Gets the string corresponding to the given key.

Parameters:
key - The key of the string.
Returns:
The string corresponding to the key if it is found, the key otherwise

getMnemonic

public java.lang.Character getMnemonic(java.lang.String key)
Gets the mnemonic of the string corresponding to the given key.

Parameters:
key - The key of the string.
Returns:
The mnemonic of the string corresponding to the given key if it is found, null otherwise

getInt

public int getInt(java.lang.String key)
Gets the integer corresponding to the given key.

Parameters:
key - The key of the integer.
Returns:
The integer corresponding to the key if it is found and is an integer value, 0 if it is found and is not an integer value, -1 otherwise

getLong

public long getLong(java.lang.String key)
Returns the long corresponding to the key passed.

Parameters:
key - The key of the long.
Returns:
The long corresponding to the key if it is found and is a long value, 0 if it is found and is not a long value, -1 otherwise

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] arguments)
Gets a message formated with the specified arguments corresponding to the given key. See MessageFormat for syntax.

Parameters:
key - the string key
arguments - the list of message argments
Returns:
the formatted string, the key if it is not found, null if the key is null.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com