net.sourceforge.groboutils.pmti.v1.defimpl
Class AbstractEditableAttribute

java.lang.Object
  extended bynet.sourceforge.groboutils.pmti.v1.defimpl.AbstractEditableAttribute
All Implemented Interfaces:
IAttribute, IEditableAttribute

public abstract class AbstractEditableAttribute
extends java.lang.Object
implements IEditableAttribute

This uses delegation to allow for maximum flexibility in creating new editable attributes based on this class through subclassing.

Since:
July 12, 2002
Version:
$Date: 2003/02/10 22:51:57 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Constructor Summary
AbstractEditableAttribute(IAttribute base)
           
 
Method Summary
 IAttributeInfo getInfo()
          Returns the meta-information for this attribute.
 java.lang.Object getValue()
          Returns the current (possibly modified) value for this attribute.
 boolean hasValueChanged()
           
abstract  boolean isValidValue(java.lang.Object value)
          Checks if the given value is a valid input value for the setValue( Object ) method.
 void setValue(java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEditableAttribute

public AbstractEditableAttribute(IAttribute base)
Method Detail

getValue

public java.lang.Object getValue()
Returns the current (possibly modified) value for this attribute.

Specified by:
getValue in interface IAttribute

getInfo

public IAttributeInfo getInfo()
Returns the meta-information for this attribute.

Specified by:
getInfo in interface IAttribute

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface IEditableAttribute
Throws:
java.lang.IllegalArgumentException - thrown if the value argument is invalid.

hasValueChanged

public boolean hasValueChanged()
Specified by:
hasValueChanged in interface IEditableAttribute
Returns:
true if the setValue( Object ) method has been called on this instance and the actual value has changed (via inspection with == and equals()), otherwise false.

isValidValue

public abstract boolean isValidValue(java.lang.Object value)
Description copied from interface: IEditableAttribute
Checks if the given value is a valid input value for the setValue( Object ) method.

Specified by:
isValidValue in interface IEditableAttribute


Copyright © 2001-2003 by The GroboUtils Project