org.jogre.util
Class AbstractProperties

java.lang.Object
  |
  +--org.jogre.util.AbstractProperties
Direct Known Subclasses:
GameLabels, GameProperties, JogreLabels

public abstract class AbstractProperties
extends Object

Abstract class which provides various methods which are common to GameProperties, GameLabels and JogreLabels.

Version:
Alpha 0.1
Author:
Bob Marks

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, 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractProperties

protected AbstractProperties(String filename)
Private constructor (Can only be called by the getInstance() method.
Parameters:
filename -  
Method Detail

get

public String get(String key)
Return the "value" for a specified "key" inside the resource bundle as a String.
Parameters:
key -  
Returns:
 

get

public String get(String key,
                  String defaultValue)
Return the "value" for a specified "key" inside the resource bundle as a String. If the value doesn't
Parameters:
key -  
defaultValue -  
Returns:
 

getInt

public int getInt(String key)
Return the "value" for a specified "key" inside the resource bundle as an int value.
Parameters:
key -  
Returns:
 

getInt

public int getInt(String key,
                  int defaultValue)
Return the "value" for a specified "key" inside the resource bundle as an int value. If the value doesn't exist then return its defaultValue instead.
Parameters:
key -  
defaultValue -  
Returns:
 

getBoolean

public boolean getBoolean(String key)
Return a boolean value from a key.
Parameters:
key -  
Returns:
 

getBoolean

public boolean getBoolean(String key,
                          boolean defaultValue)
Return a boolean value from a key. If the key doesn't exist then return the default value.
Parameters:
key -  
defaultValue -  
Returns: