me.mjolnir.mineconomy.loaders
Class PluginProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by me.mjolnir.mineconomy.loaders.PluginProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class PluginProperties
extends java.util.Properties

Handles read/write for the properties file.

Author:
MjolnirCommando
See Also:
Serialized Form

Constructor Summary
PluginProperties(java.lang.String file)
          Creates new PluginProperties object.
 
Method Summary
 boolean getBoolean(java.lang.String key, boolean b)
          Retrieves the specified boolean from the file.
 double getDouble(java.lang.String key, double value)
          Retrieves the specified double from the file.
 int getInteger(java.lang.String key, int value)
          Retrieves the specified integer from the file.
 java.lang.String getString(java.lang.String key, java.lang.String value)
          Retrieves the specified string from the file.
 java.util.Enumeration keys()
           
 void load()
          Loads the MineConomy properties.
 void save(java.lang.String start)
          Saves to the MineConomy properties.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginProperties

public PluginProperties(java.lang.String file)
Creates new PluginProperties object.

Parameters:
file -
Method Detail

keys

public java.util.Enumeration keys()
Overrides:
keys in class java.util.Hashtable<java.lang.Object,java.lang.Object>

load

public void load()
Loads the MineConomy properties.


save

public void save(java.lang.String start)
Saves to the MineConomy properties.

Parameters:
start -

getDouble

public double getDouble(java.lang.String key,
                        double value)
Retrieves the specified double from the file.

Parameters:
key -
value -
Returns:
double

getInteger

public int getInteger(java.lang.String key,
                      int value)
Retrieves the specified integer from the file.

Parameters:
key -
value -
Returns:
integer

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String value)
Retrieves the specified string from the file.

Parameters:
key -
value -
Returns:
string

getBoolean

public boolean getBoolean(java.lang.String key,
                          boolean b)
Retrieves the specified boolean from the file.

Parameters:
key -
b -
Returns:
boolean