Package net.infonode.properties.util
Class AbstractProperty
- java.lang.Object
-
- net.infonode.properties.util.AbstractProperty
-
- All Implemented Interfaces:
Property
- Direct Known Subclasses:
ValueHandlerProperty
public abstract class AbstractProperty extends java.lang.Object implements Property
An abstract base class for properties.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProperty(PropertyGroup group, java.lang.String name, java.lang.Class type, java.lang.String description)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeAssiged(java.lang.Object value)Returns true if the value can be assigned to this property.java.lang.StringgetDescription()Returns a description of this property.PropertyGroupgetGroup()Returns the property group that this property belongs to.java.lang.StringgetName()Returns the property name.java.lang.ClassgetType()Returns the value type of this property.booleanisMutable()Returns true if this property is mutable.voidsetValue(java.lang.Object object, java.lang.Object value)Sets the value of this property in an object.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.infonode.properties.base.Property
getValue, removeValue, valueIsRemovable, valueIsSet
-
-
-
-
Constructor Detail
-
AbstractProperty
protected AbstractProperty(PropertyGroup group, java.lang.String name, java.lang.Class type, java.lang.String description)
Constructor.- Parameters:
group- the property groupname- the property nametype- the property typedescription- the property description
-
-
Method Detail
-
getGroup
public PropertyGroup getGroup()
Description copied from interface:PropertyReturns the property group that this property belongs to.
-
getName
public java.lang.String getName()
Description copied from interface:PropertyReturns the property name.
-
getType
public java.lang.Class getType()
Description copied from interface:PropertyReturns the value type of this property. The property can only be set to values that are of this class or a sub class of this class.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:PropertyReturns a description of this property.- Specified by:
getDescriptionin interfaceProperty- Returns:
- a description of this property
-
isMutable
public boolean isMutable()
Description copied from interface:PropertyReturns true if this property is mutable.
-
setValue
public void setValue(java.lang.Object object, java.lang.Object value)Description copied from interface:PropertySets the value of this property in an object.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
canBeAssiged
public boolean canBeAssiged(java.lang.Object value)
Description copied from interface:PropertyReturns true if the value can be assigned to this property.- Specified by:
canBeAssigedin interfaceProperty- Parameters:
value- the value to assign- Returns:
- true if the value can be assigned to this property
-
-