|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
de.beamertool.util.ExtProperties
public class ExtProperties
This class extends Properties with methods to put and get Colors, Integers, Fonts, Lists, Maps and Boolean values. Internal these values are saved as Strings. So be careful while editing the saved properties file. Otherwise the transaltion from string back to value might fail.
| Constructor Summary | |
|---|---|
ExtProperties()
Constructs an empty Extproperties |
|
ExtProperties(Properties defaults)
Constructs an Extproperties with the given defaults |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
getBoolean(String key)
Gets the boolean value of the given key |
boolean |
getBoolean(String key,
Boolean defaultValue)
Gets the boolean value of the given key |
Collection<String> |
getCollection(String key)
Gets the collection of the given key |
Collection<String> |
getCollection(String key,
Collection<String> defaultValue)
Gets the collection of the given key |
Color |
getColor(String key)
Gets the Color value of the given key |
Color |
getColor(String key,
Color defaultValue)
Gets the Color value of the given key |
CommPort |
getCommPort(String key)
|
CommPort |
getCommPort(String key,
CommPort defaultValue)
|
Font |
getFont(String key)
Gets the font value of the given key |
Font |
getFont(String key,
Font defaultValue)
Gets the Font value of the given key |
int |
getInteger(String key)
Gets the integer value of the given key |
int |
getInteger(String key,
Integer defaultValue)
Gets the integer value of the given key |
Map<String,String> |
getMap(String key)
Gets the map of the given key |
Map<String,String> |
getMap(String key,
Map<String,String> defaultValue)
Gets the map of the given key |
MessageOrientation |
getMessageOrientation(String key)
|
MessageOrientation |
getMessageOrientation(String key,
MessageOrientation defaultValue)
|
MessagePresentation |
getMessagePresentation(String key)
|
MessagePresentation |
getMessagePresentation(String key,
MessagePresentation defaultValue)
|
MobileType |
getMobileType(String key)
Gets the mobile type of the given key |
MobileType |
getMobileType(String key,
MobileType defaultValue)
Gets the mobile type of the given key |
String |
getString(String key)
Wrapper around getProperty for nameing reasons |
String |
getString(String key,
String defaultValue)
Wrapper around getProperty for nameing reasons |
void |
putBoolean(String key,
Boolean value)
Saves the given boolean under key. |
void |
putCollection(String key,
Collection<String> value)
Saves the given list under key. |
void |
putColor(String key,
Color value)
Saves the given Color under key. |
void |
putCommPort(String key,
CommPort value)
|
void |
putFont(String key,
Font value)
Saves the given Font under key. |
void |
putInteger(String key,
Integer value)
Saves the given integer under key. |
void |
putMap(String key,
Map<String,String> value)
Saves the given map under key. |
void |
putMessageOrientation(String key,
MessageOrientation value)
|
void |
putMessagePresentation(String key,
MessagePresentation value)
|
void |
putMobileType(String key,
MobileType value)
Saves the given mobile type under key. |
void |
putString(String key,
String value)
Wrapper around setProperty for nameing reasons |
| Methods inherited from class java.util.Properties |
|---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
|---|
clear, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExtProperties()
Properties.Properties()public ExtProperties(Properties defaults)
defaults - Properties.Properties(Properties)| Method Detail |
|---|
public Object clone()
clone in class Hashtable<Object,Object>public boolean getBoolean(String key)
key - -
The key of the requested value
public boolean getBoolean(String key,
Boolean defaultValue)
key - -
The key of the requested valuedefaultValue - -
The default value if the key is not found
public Collection<String> getCollection(String key)
key - - The key of the requested value
public Collection<String> getCollection(String key,
Collection<String> defaultValue)
key - - The key of the requested valuedefaultValue - - The default value if the key is not found
public Color getColor(String key)
key - -
The key of the requested value
public Color getColor(String key,
Color defaultValue)
key - -
The key of the requested valuedefaultValue - -
The default value if the key is not found
public CommPort getCommPort(String key)
public CommPort getCommPort(String key,
CommPort defaultValue)
public Font getFont(String key)
key - -
The key of the requested value
public Font getFont(String key,
Font defaultValue)
key - -
The key of the requested valuedefaultValue - -
The default value if the key is not found
public int getInteger(String key)
key - -
The key of the requested value
public int getInteger(String key,
Integer defaultValue)
key - -
The key of the requested valuedefaultValue - -
The default value if the key is not found
public Map<String,String> getMap(String key)
key - - The key of the requested value
public Map<String,String> getMap(String key,
Map<String,String> defaultValue)
key - - The key of the requested valuedefaultValue - - The default value if the key is not found
public MessageOrientation getMessageOrientation(String key)
public MessageOrientation getMessageOrientation(String key,
MessageOrientation defaultValue)
public MessagePresentation getMessagePresentation(String key)
public MessagePresentation getMessagePresentation(String key,
MessagePresentation defaultValue)
public MobileType getMobileType(String key)
key - -
The key of the requested value or null if the key isn't found
public MobileType getMobileType(String key,
MobileType defaultValue)
key - -
The key of the requested valuedefaultValue - -
The default value if the key is not found
public String getString(String key)
Properties.getProperty(String)
public String getString(String key,
String defaultValue)
Properties.getProperty(String, String)
public void putBoolean(String key,
Boolean value)
key - -
The key as the value is saved forvalue - -
The value which is saved
public void putCollection(String key,
Collection<String> value)
key - - The key as the value is saved forvalue - - The value which is saved
public void putColor(String key,
Color value)
key - -
The key as the value is saved forvalue - -
The value which is saved
public void putCommPort(String key,
CommPort value)
public void putFont(String key,
Font value)
key - -
The key as the value is saved forvalue - -
The value which is saved
public void putInteger(String key,
Integer value)
key - -
The key as the value is saved forvalue - -
The value which is saved
public void putMap(String key,
Map<String,String> value)
key - - The key as the value is saved forvalue - - The value which is saved
public void putMessageOrientation(String key,
MessageOrientation value)
public void putMessagePresentation(String key,
MessagePresentation value)
public void putMobileType(String key,
MobileType value)
key - -
The key as the value is saved forvalue - -
The value which is saved
public void putString(String key,
String value)
Properties.setProperty(String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||