|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.commsen.apropos.core.Property
public class Property
This class represents property. In APropOS a property is a very simple object having name, value, description and group it belongs to.
| Constructor Summary | |
|---|---|
Property(java.lang.String name)
Creates new property with given name |
|
Property(java.lang.String name,
java.lang.String value,
java.lang.String description,
java.lang.String group)
Creates new property object and sets all fields with appropriate values |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Returns true if obj.name.equals(name) |
java.lang.String |
getDescription()
|
java.lang.String |
getGroup()
|
java.lang.String |
getName()
|
java.lang.String |
getValue()
|
int |
hashCode()
Returns hashCode based on name to conform to modified equals(Object)
method. |
boolean |
sameAs(Property property)
Checks if given property is the same as the one represented by this object. |
void |
setDescription(java.lang.String description)
|
void |
setGroup(java.lang.String group)
|
void |
setName(java.lang.String name)
|
void |
setValue(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Property(java.lang.String name)
throws PropertiesException
name
name - the name of the property
PropertiesException - if name is null or blank
public Property(java.lang.String name,
java.lang.String value,
java.lang.String description,
java.lang.String group)
throws PropertiesException
name - the property namevalue - the property valuedescription - the property descriptiongroup - the group this property belongs to
PropertiesException - if name is null or blank| Method Detail |
|---|
public boolean sameAs(Property property)
property is the same as the one represented by this object.
This method will return true if ALL fields have exactly the same values and
false otherwise
property - the property to compare
true if both object have exactly the same values in all fields and
false otherwise
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean equals(java.lang.Object obj)
obj.name.equals(name)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
name to conform to modified equals(Object)
method.
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String getName()
public void setName(java.lang.String name)
throws PropertiesException
name - the name of the property
PropertiesException - if name is null or blankpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - the value to setpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - the description to setpublic java.lang.String getGroup()
public void setGroup(java.lang.String group)
group - the group to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||