|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractMap | +--java.util.HashMap | +--planetj.property.PropertyGroup
Contains any number of related Property objects. Subclasses must provide a default constructor.
Field Summary | |
static String |
ALL_FALSE
A metaproperty which allows any number of boolean properties to be set to false in the following fashion: allFalse: property1, property2, property3, ... |
static String |
ALL_TRUE
A metaproperty which allows any number of boolean properties to be set to true in the following fashion: allTrue: property1, property2, property3, ... |
static short |
BOOLEAN_PROPERTY
|
static short |
DATE_PROPERTY
|
static short |
DOUBLE_PROPERTY
|
static short |
INTEGER_PROPERTY
|
static short |
LIST_PROPERTY
|
static String |
ROW_COLLECTION_KEY
|
static short |
STRING_PROPERTY
|
Constructor Summary | |
PropertyGroup()
PropertyGroup constructor comment. |
|
PropertyGroup(int initialCapacity)
PropertyGroup constructor comment. |
|
PropertyGroup(String pName)
PropertyGroup constructor comment. |
Method Summary | |
Property |
add(Property pProperty)
Adds a new Property to this PropertyGroup, replacing any previous Property with the same name |
Property |
addProperty(Property pProperty)
Adds a new Property to this PropertyGroup, replacing any previous Property with the same name |
Property |
addProperty(String pName,
Object pValue)
Creates a new Property object based on a name and value. |
StringBuffer |
append(StringBuffer sb)
|
Object |
clone()
|
int |
compareTo(Object o)
Compares this PropertyGroup with another by examining their names, or compares this PropertyGroup to a String (in this case this PropertyGroup's name is compared with the String) |
int |
compareTo(PropertyGroup pPG)
Comapres this PropertyGroup with another by examining their names |
int |
compareTo(String pName)
Comapres the name of this PropertyGroup with a String. |
boolean |
containsProperty(String propertyName)
|
Property |
createProperty(String pName,
Object pValue)
Creates a new Property object based on a name and value (the Property is not added to this PropertyGroup). |
List |
getAllMetapropertyNames()
Gets a List containing the names of all the supported metaproperties. |
abstract List |
getAllPropertyNames()
Gets a List containing the names of all the supported properties, not including metaproperties. |
List |
getAllSetBooleanPropertyNames()
Gets a List containing the names of all the boolean properties that have been set on this PropertyGroup. |
List |
getAllSetIntPropertyNames()
Gets a List containing the names of all the int properties that have been set on this PropertyGroup. |
List |
getAllSetListPropertyNames()
Gets a List containing the names of all the List properties that have been set on this PropertyGroup. |
List |
getAllSetPropertyNames()
Gets a List containing the names of all the properties that have been set on this PropertyGroup. |
List |
getAllSetStringPropertyNames()
Gets a List containing the names of all the String properties that have been set on this PropertyGroup. |
boolean |
getBooleanValue(String pName)
Gets the value of the Property with the specified name as a boolean. |
Date |
getDateValue(String pName)
Gets the value of the Property with the specified name as a Date. |
double |
getDoubleValue(String pName)
Gets the value of the Property with the specified name as an double. |
int |
getIntValue(String pName)
Gets the value of the Property with the specified name as an int. |
List |
getListValue(String pName)
Gets the value of the Property with the specified name as a List |
String |
getName()
Gets the name of this PropertyGroup |
Property |
getProperty(String pName)
Gets the Property with the specified name |
short |
getPropertyType(String pPropertyName)
Gets the type of property for a specified property name. |
abstract List |
getRequiredPropertyNames()
Gets a List containing the names of all the required properties. |
String |
getStringValue(String pName)
Gets the value of the Property with the specified name as a String |
Object |
getValue(String pName)
Gets the value of the Property with the specified name |
boolean |
isMergeableOnList(PropertyGroup pGroup,
String pMergeProperty)
Tests if this PropertyGroup can be merged with another PropertyGroup on a property. |
boolean |
isMetaproperty(String pPropertyName)
Tests if a property is a metaproperty. |
Iterator |
iterator()
Gets an Iterator for this PropertyGroup |
PropertyGroup |
mergeOnList(PropertyGroup pGroup,
String pMergeProperty)
Merges this PropertyGroup into another PropertyGroup. |
Property |
put(Property p)
Adds a Property object to this PropertyGroup |
Object |
put(String pName,
Object pValue)
Sets the *VALUE* of a property in this PropertyGroup. |
Property |
put(String pName,
Property p)
Adds a Property object to this PropertyGroup |
void |
setName(String newName)
Sets the name of this PropertyGroup |
String |
toString()
|
Object |
updateProperty(String pName,
Object pValue)
Updates a Property's value. |
Methods inherited from class java.util.HashMap |
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
Field Detail |
public static final String ALL_TRUE
public static final String ALL_FALSE
public static final String ROW_COLLECTION_KEY
public static final short STRING_PROPERTY
public static final short LIST_PROPERTY
public static final short BOOLEAN_PROPERTY
public static final short INTEGER_PROPERTY
public static final short DOUBLE_PROPERTY
public static final short DATE_PROPERTY
Constructor Detail |
public PropertyGroup()
public PropertyGroup(int initialCapacity)
initialCapacity
- intpublic PropertyGroup(String pName)
Method Detail |
public Property add(Property pProperty)
public Property addProperty(String pName, Object pValue)
public Property addProperty(Property pProperty)
public StringBuffer append(StringBuffer sb)
public Object clone()
clone
in class HashMap
public int compareTo(Object o)
compareTo
in interface Comparable
public int compareTo(String pName)
public int compareTo(PropertyGroup pPG)
public boolean containsProperty(String propertyName)
public Property createProperty(String pName, Object pValue)
public List getAllMetapropertyNames()
public abstract List getAllPropertyNames()
public List getAllSetBooleanPropertyNames()
public List getAllSetIntPropertyNames()
public List getAllSetListPropertyNames()
public List getAllSetPropertyNames()
public List getAllSetStringPropertyNames()
public boolean getBooleanValue(String pName)
public Date getDateValue(String pName)
public double getDoubleValue(String pName)
public int getIntValue(String pName)
public List getListValue(String pName)
public String getName()
public Property getProperty(String pName)
public final short getPropertyType(String pPropertyName)
public abstract List getRequiredPropertyNames()
public String getStringValue(String pName)
public Object getValue(String pName)
public boolean isMergeableOnList(PropertyGroup pGroup, String pMergeProperty)
public boolean isMetaproperty(String pPropertyName)
public Iterator iterator()
public PropertyGroup mergeOnList(PropertyGroup pGroup, String pMergeProperty)
isMergeableOnList()
method returns
true for the two PropertyGroups. This object is not altered by this method.
GroupA {
prop1: value1;
prop2: value2A, value2B;
prop3: value3;
prop4: value4A, value4B, value4C;
}
GroupA {
prop1: value1;
prop2: value2C;
prop3: value3;
prop4: value4A, value4B, value4C;
}
on the prop2
property (this is the only property that can be merged on) would result in
the following PropertyGroup:
GroupA {
prop1: value1;
prop2: value2A, value2B, value2C;
prop3: value3;
prop4: value4A, value4B, value4C;
}
public Object put(String pName, Object pValue)
public Property put(String pName, Property p)
public Property put(Property p)
public void setName(String newName)
public String toString()
toString
in class AbstractMap
public Object updateProperty(String pName, Object pValue)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |