|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jogre.common.util.AbstractProperties
Abstract class which provides various methods which are common to GameProperties, GameLabels and JogreLabels.
Field Summary | |
protected ResourceBundle |
rb
Resource bundle. |
Constructor Summary | |
protected |
AbstractProperties(String filename)
Private constructor (Can only be called by the getInstance() method. |
Method Summary | |
String |
get(String key)
Return the "value" for a specified "key" inside the resource bundle as a String. |
String |
get(String key,
Object[] arguments)
Return the "value" for a specified "key" inside the resource bundle as an String value, in case "value" contains "variables". |
String |
get(String key,
String defaultValue)
Return the "value" for a specified "key" inside the resource bundle as a String. |
boolean |
getBoolean(String key)
Return a boolean value from a key. |
boolean |
getBoolean(String key,
boolean defaultValue)
Return a boolean value from a key. |
int |
getInt(String key)
Return the "value" for a specified "key" inside the resource bundle as an int value. |
int |
getInt(String key,
int defaultValue)
Return the "value" for a specified "key" inside the resource bundle as an int value. |
ResourceBundle |
getResourceBundle()
|
void |
reload()
Reload all resource bundles (if there has been a |
void |
reset()
Recreates ResourceBundle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ResourceBundle rb
Constructor Detail |
protected AbstractProperties(String filename)
filename
- Method Detail |
public void reload()
public String get(String key)
key
- Key to get value from.
public String get(String key, String defaultValue)
key
- Key to get value from.defaultValue
- Default value if key doesn't retrieve a value.
public int getInt(String key)
key
- Key to get value from.
public int getInt(String key, int defaultValue)
key
- Key to get value from.defaultValue
- Default integer value if key isn't found.
public String get(String key, Object[] arguments)
key
- Key to get value from.arguments
- Arguments
public boolean getBoolean(String key)
key
- Key to get value from.
public boolean getBoolean(String key, boolean defaultValue)
key
- Key to get value from.defaultValue
- Default boolean value if key isn't found.
public void reset()
public ResourceBundle getResourceBundle()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |