|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
planetj.property.PropertyGroup
Contains any number of related Property objects. Subclasses must provide a default constructor.
Field Summary | |
static java.lang.String |
ALL
Value to denote that a property exists, and has all of its possible values. |
static java.lang.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 java.lang.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 |
FLOAT_PROPERTY
|
static short |
INTEGER_PROPERTY
|
static short |
JAVA_CLASS_PROPERTY
|
static short |
LIST_PROPERTY
|
static short |
MAP_PROPERTY
|
static java.lang.String |
NONE
Value to denote that a property exists, but it doesn't have a value. |
static java.lang.String |
ROW_COLLECTION_KEY
|
static short |
STRING_PROPERTY
|
Constructor Summary | |
PropertyGroup()
PropertyGroup constructor comment. |
|
PropertyGroup(int initialCapacity)
PropertyGroup constructor comment. |
|
PropertyGroup(java.lang.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(java.lang.String pName,
java.lang.Object pValue)
Creates a new Property object based on a name and value. |
java.lang.StringBuffer |
append(java.lang.StringBuffer sb)
|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.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(java.lang.String pName)
Comapres the name of this PropertyGroup with a String. |
boolean |
containsProperty(java.lang.String propertyName)
|
void |
copyUndefinedPropertiesFrom(PropertyGroup pg)
Any properties defined in the other property group which are not defined in this property group are copied into this property group. |
Property |
createProperty(java.lang.String pName,
java.lang.Object pValue)
Creates a new Property object based on a name and value (the Property is not added to this PropertyGroup). |
java.util.List |
getAllMetapropertyNames()
Gets a List containing the names of all the supported metaproperties. |
abstract java.util.List |
getAllPropertyNames()
Gets a List containing the names of all the supported properties, not including metaproperties. |
java.util.List |
getAllSetBooleanPropertyNames()
Gets a List containing the names of all the boolean properties that have been set on this PropertyGroup. |
java.util.List |
getAllSetIntPropertyNames()
Gets a List containing the names of all the int properties that have been set on this PropertyGroup. |
java.util.List |
getAllSetListPropertyNames()
Gets a List containing the names of all the List properties that have been set on this PropertyGroup. |
java.util.List |
getAllSetPropertyNames()
Gets a List containing the names of all the properties that have been set on this PropertyGroup. |
java.util.List |
getAllSetStringPropertyNames()
Gets a List containing the names of all the String properties that have been set on this PropertyGroup. |
boolean |
getBooleanValue(java.lang.String pName)
Gets the value of the Property with the specified name as a boolean. |
java.util.Date |
getDateValue(java.lang.String pName)
Gets the value of the Property with the specified name as a Date. |
double |
getDoubleValue(java.lang.String pName)
Gets the value of the Property with the specified name as a double. |
float |
getFloatValue(java.lang.String pName)
Gets the value of the Property with the specified name as a float Float.NaN is returned if there is no property with the specified name. |
int |
getIntValue(java.lang.String pName)
Gets the value of the Property with the specified name as an int. |
java.lang.Class |
getJavaClassValue(java.lang.String pName)
Gets the value of the Property with the specified name as a Java class. |
java.util.List |
getListValue(java.lang.String pName)
Gets the value of the Property with the specified name as a List |
java.util.Map |
getMapValue(java.lang.String name)
Gets the value of the Property with the specified name as a Map |
java.lang.String |
getName()
Gets the name of this PropertyGroup |
Property |
getProperty(java.lang.String pName)
Gets the Property with the specified name |
short |
getPropertyType(java.lang.String pPropertyName)
Gets the type of property for a specified property name. |
abstract java.util.List |
getRequiredPropertyNames()
Gets a List containing the names of all the required properties. |
java.lang.String |
getStringValue(java.lang.String pName)
Gets the value of the Property with the specified name as a String |
java.lang.Object |
getValue(java.lang.String pName)
Gets the value of the Property with the specified name |
boolean |
isMergeableOnList(PropertyGroup pGroup,
java.lang.String pMergeProperty)
Tests if this PropertyGroup can be merged with another PropertyGroup on a property. |
boolean |
isMetaproperty(java.lang.String pPropertyName)
Tests if a property is a metaproperty. |
java.util.Iterator |
iterator()
Gets an Iterator for this PropertyGroup |
PropertyGroup |
mergeOnList(PropertyGroup pGroup,
java.lang.String pMergeProperty)
Merges this PropertyGroup into another PropertyGroup. |
Property |
put(Property p)
Adds a Property object to this PropertyGroup |
java.lang.Object |
put(java.lang.String pName,
java.lang.Object pValue)
Sets the *VALUE* of a property in this PropertyGroup. |
Property |
put(java.lang.String pName,
Property p)
Adds a Property object to this PropertyGroup |
void |
setName(java.lang.String newName)
Sets the name of this PropertyGroup |
java.lang.String |
toString()
|
java.lang.Object |
updateProperty(java.lang.String pName,
java.lang.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 java.lang.String NONE
public static final java.lang.String ALL
public static final java.lang.String ALL_TRUE
public static final java.lang.String ALL_FALSE
public static final java.lang.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
public static final short JAVA_CLASS_PROPERTY
public static final short MAP_PROPERTY
public static final short FLOAT_PROPERTY
Constructor Detail |
public PropertyGroup()
public PropertyGroup(int initialCapacity)
initialCapacity
- intpublic PropertyGroup(java.lang.String pName)
Method Detail |
public Property add(Property pProperty)
public Property addProperty(java.lang.String pName, java.lang.Object pValue)
public Property addProperty(Property pProperty)
public java.lang.StringBuffer append(java.lang.StringBuffer sb)
public java.lang.Object clone()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int compareTo(java.lang.String pName)
public int compareTo(PropertyGroup pPG)
public boolean containsProperty(java.lang.String propertyName)
public void copyUndefinedPropertiesFrom(PropertyGroup pg)
public Property createProperty(java.lang.String pName, java.lang.Object pValue)
public java.util.List getAllMetapropertyNames()
public abstract java.util.List getAllPropertyNames()
public java.util.List getAllSetBooleanPropertyNames()
public java.util.List getAllSetIntPropertyNames()
public java.util.List getAllSetListPropertyNames()
public java.util.List getAllSetPropertyNames()
public java.util.List getAllSetStringPropertyNames()
public boolean getBooleanValue(java.lang.String pName)
public java.util.Date getDateValue(java.lang.String pName)
public double getDoubleValue(java.lang.String pName)
public float getFloatValue(java.lang.String pName)
public int getIntValue(java.lang.String pName)
public java.lang.Class getJavaClassValue(java.lang.String pName)
public java.util.List getListValue(java.lang.String pName)
public java.util.Map getMapValue(java.lang.String name)
public java.lang.String getName()
public Property getProperty(java.lang.String pName)
public final short getPropertyType(java.lang.String pPropertyName)
public abstract java.util.List getRequiredPropertyNames()
public java.lang.String getStringValue(java.lang.String pName)
public java.lang.Object getValue(java.lang.String pName)
public boolean isMergeableOnList(PropertyGroup pGroup, java.lang.String pMergeProperty)
public boolean isMetaproperty(java.lang.String pPropertyName)
public java.util.Iterator iterator()
public PropertyGroup mergeOnList(PropertyGroup pGroup, java.lang.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 java.lang.Object put(java.lang.String pName, java.lang.Object pValue)
public Property put(java.lang.String pName, Property p)
public Property put(Property p)
public void setName(java.lang.String newName)
public java.lang.String toString()
public java.lang.Object updateProperty(java.lang.String pName, java.lang.Object pValue)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |