|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.data.DataObject
ewe.util.Vector
ewe.data.PropertyList
| Nested Class Summary | |
static class |
PropertyList.NullPropertyList
|
| Field Summary | |
static PropertyList |
nullPropertyList
|
| Constructor Summary | |
PropertyList()
|
|
PropertyList(Object[] nameAndValues)
|
|
| Method Summary | |
boolean |
_getSetField(String fieldName,
Wrapper wrapper,
boolean isGet)
This is used for data transfer using a ewe.reflect.FieldTransfer object. |
boolean |
add(Object[] nameAndValues)
|
boolean |
add(Property prop)
Adds a non-exclusive property. |
boolean |
add(PropertyList prop)
|
boolean |
add(String props,
Object value)
Adds a non-exclusive property. |
void |
defaultTo(String nameAndValues)
|
boolean |
defaultTo(String name,
Object value)
|
void |
fromHashtable(Hashtable source)
Put the values in the Hashtable into the PropertyList. |
static PropertyList |
fromStrings(String s)
|
Property |
get(String name)
Get the property with the specified name. |
Property |
get(String name,
Property previous)
Get the property with the specified name, starting with the previous one. |
static boolean |
getBoolean(Object propertyListOrStrings,
String name,
boolean defaultValue)
This first converts the propertyListOrStrings parameters into a valid or empty PropertyList and then calls getBoolean(name,defaultValue) on that list. |
boolean |
getBoolean(String name,
boolean def)
|
static double |
getDouble(Object propertyListOrStrings,
String name,
double defaultValue)
This first converts the propertyListOrStrings parameters into a valid or empty PropertyList and then calls getDouble(name,defaultValue) on that list. |
double |
getDouble(String name,
double def)
|
void |
getField(String name,
Wrapper wrapper)
|
static int |
getInt(Object propertyListOrStrings,
String name,
int defaultValue)
This first converts the propertyListOrStrings parameters into a valid or empty PropertyList and then calls getInt(name,defaultValue) on that list. |
int |
getInt(String name,
int def)
|
String[] |
getNames()
|
PropertyList |
getProperties()
This returns itself. |
static PropertyList |
getProperties(Object obj)
|
Iterator |
getProperties(String prop)
Return an Enumeration of all the properties with a given name. |
Vector |
getPropertyValues(String propertyName)
Gather all the property values with a certain name into a Vector. |
static boolean |
getSetProperties(Object obj,
String fieldName,
Wrapper wrapper,
boolean isGet)
|
static String |
getString(Object propertyListOrStrings,
String name,
String defaultValue)
This first converts the propertyListOrStrings parameters into a valid or empty PropertyList and then calls getString(name,defaultValue) on that list. |
String |
getString(String name,
String deflt)
|
String[] |
getStrings(String props,
String defaultValue)
Gets a set of properties, each associated with a string. |
String |
getText()
|
static Object |
getValue(Object propertyListOrStrings,
String name,
Object defaultValue)
This first converts the propertyListOrStrings parameters into a valid or empty PropertyList and then calls getValue(name,defaultValue) on that list. |
Object |
getValue(String[] v,
Object deflt)
Gets the value of a property which may be named differently (e.g. |
Object |
getValue(String name,
Object deflt)
Gets the value of a property, with a default if it does not exist. |
Object |
getValue(Vector v,
Object deflt)
Gets the value of a property which may be named differently (e.g. |
static PropertyList |
make(String from)
This will create a new PropertyList and call setStrings() on it. |
void |
readConfigFile(StreamReader br)
|
boolean |
remove(String props)
Removes all properties with the name. |
boolean |
set(Property prop)
Sets an exclusive property. |
boolean |
set(PropertyList pl)
|
boolean |
set(String props,
Object value)
Sets an exclusive property. |
boolean |
setBoolean(String name,
boolean value)
|
void |
setField(String name,
Wrapper wrapper)
|
boolean |
setInt(String name,
int value)
|
boolean |
setStrings(String propsAndValues)
Sets a set of properties, each associated with a string. |
void |
setText(String text)
|
Hashtable |
toHashtable(Hashtable destination)
Put the PropertyList values into a Hashtable. |
static PropertyList |
toPropertyList(Object propertyListOrStrings)
This will convert a set of properties encoded as Strings separated by '|' characters into a PropertyList OR it will return the PropertyList if the parameter implements HasProperties, OR it will return a nullPropertyList object |
| Methods inherited from class ewe.util.Vector |
add, add, add, addAll, addAll, addAll, addCopiesFrom, addElement, clear, compare, contains, copyCopiesFrom, copyFrom, copyInto, copyInto, del, elementAt, elements, find, find, get, getCount, getFullCopy, insert, insertElementAt, isEmpty, iterator, iterator, pop, push, remove, removeAllElements, removeElementAt, set, setElementAt, setSize, size, sort, sort, toArray, toArray, toObjectArray, toString, zero |
| Methods inherited from class ewe.data.DataObject |
appendAllFields, compareTo, copied, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getDeclaredFieldValue, getFieldList, getFieldList, getMyFieldList, getNew |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode |
| Field Detail |
public static final PropertyList nullPropertyList
| Constructor Detail |
public PropertyList(Object[] nameAndValues)
public PropertyList()
| Method Detail |
public PropertyList getProperties()
getProperties in interface HasPropertiespublic boolean add(Object[] nameAndValues)
public boolean defaultTo(String name,
Object value)
public void defaultTo(String nameAndValues)
public boolean setBoolean(String name,
boolean value)
public boolean setInt(String name,
int value)
public boolean getBoolean(String name,
boolean def)
public double getDouble(String name,
double def)
public int getInt(String name,
int def)
public Property get(String name)
public Property get(String name,
Property previous)
public Object getValue(String name,
Object deflt)
public String getString(String name,
String deflt)
public Object getValue(Vector v,
Object deflt)
public Object getValue(String[] v,
Object deflt)
public boolean set(Property prop)
public boolean set(String props,
Object value)
public boolean set(PropertyList pl)
public boolean setStrings(String propsAndValues)
public String[] getStrings(String props,
String defaultValue)
public boolean add(Property prop)
public boolean add(PropertyList prop)
public boolean add(String props,
Object value)
public boolean remove(String props)
public Vector getPropertyValues(String propertyName)
public Iterator getProperties(String prop)
public static PropertyList make(String from)
from - The encoded PropertyValues.
setStrings()public String[] getNames()
public static PropertyList fromStrings(String s)
public String getText()
getText in interface Textablepublic void setText(String text)
setText in interface Textable
public void setField(String name,
Wrapper wrapper)
public void getField(String name,
Wrapper wrapper)
public static PropertyList getProperties(Object obj)
public static boolean getSetProperties(Object obj,
String fieldName,
Wrapper wrapper,
boolean isGet)
public boolean _getSetField(String fieldName,
Wrapper wrapper,
boolean isGet)
DataObjectBy default this method calls getProperties() and then calls the _getSetField() method in PropertyList.
_getSetField in class DataObjectfieldName - The name of the field.wrapper - A wrapper containing the data to be assigned to the field or the wrapper into
which you should place the field data.isGet - if this is true then it is a get operation (in which case you should set
the wrapper value to be the field value) if it is false it is a set operation and
the wrapper contains the field value to assign to the field.
public static PropertyList toPropertyList(Object propertyListOrStrings)
propertyListOrStrings - If this is a String it will be decoded using
public static Object getValue(Object propertyListOrStrings,
String name,
Object defaultValue)
propertyListOrStrings - name - defaultValue -
public static int getInt(Object propertyListOrStrings,
String name,
int defaultValue)
public static double getDouble(Object propertyListOrStrings,
String name,
double defaultValue)
public static boolean getBoolean(Object propertyListOrStrings,
String name,
boolean defaultValue)
public static String getString(Object propertyListOrStrings,
String name,
String defaultValue)
public void readConfigFile(StreamReader br)
public Hashtable toHashtable(Hashtable destination)
destination - the destination Hashtable or null to return a new one.
public void fromHashtable(Hashtable source)
source - the source Hashtable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||