|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.usc.cse.desi.properties.PropertyHolder
This class will contain the properties of an object with properties. In order for an object to have properties, it should contain an instance of this class. This class actually implements the IObjectWithProperties interface. This interface is otherwise only implemented by model objects with properties.
| Field Summary | |
private java.util.HashMap |
myProperties
|
| Constructor Summary | |
private |
PropertyHolder()
|
|
PropertyHolder(java.util.Map prop_mapping)
|
| Method Summary | |
java.util.Collection |
getProperties()
This method returns a Collection of all the Propery objects for the given implementor. |
java.lang.String |
getPropertyDisplayName(java.lang.String prop_name)
Properties, in addition to having values also have display names. |
java.lang.Object |
getPropertyValue(java.lang.String prop_name)
This method should gets the given property. |
boolean |
hasProperty(java.lang.String prop_name)
Checks to see if the object has the given property. |
void |
setPropertyValue(java.lang.String prop_name,
java.lang.Object value)
This method will set the given property with the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.HashMap myProperties
| Constructor Detail |
private PropertyHolder()
public PropertyHolder(java.util.Map prop_mapping)
| Method Detail |
public java.lang.String getPropertyDisplayName(java.lang.String prop_name)
throws PropertyNotFoundException
IObjectWithProperties
getPropertyDisplayName in interface IObjectWithPropertiesprop_name -
PropertyNotFoundException
public java.lang.Object getPropertyValue(java.lang.String prop_name)
throws PropertyNotFoundException
IObjectWithProperties
getPropertyValue in interface IObjectWithPropertiesprop_name - The name of the property to get.
PropertyNotFoundException - Thrown if the given property does not exist for this type.public boolean hasProperty(java.lang.String prop_name)
IObjectWithProperties
hasProperty in interface IObjectWithPropertiesprop_name - String - The name of the property.
public void setPropertyValue(java.lang.String prop_name,
java.lang.Object value)
throws PropertyNotFoundException,
java.lang.ClassCastException
IObjectWithProperties
setPropertyValue in interface IObjectWithPropertiesprop_name - String - The name of the proerty to be set.value - Object - The value to set the property to.
java.lang.ClassCastException - Thrown if there is a mismatch between the given value type and the type of the property.
PropertyNotFoundException - Thrown if this object doesn't have the given property.public java.util.Collection getProperties()
IObjectWithProperties
getProperties in interface IObjectWithProperties
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||