org.qi4j.api.property
Class ComputedPropertyInstance<T>

java.lang.Object
  extended by org.qi4j.api.property.AbstractPropertyInstance<T>
      extended by org.qi4j.api.property.ComputedPropertyInstance<T>
All Implemented Interfaces:
Property<T>, PropertyInfo

public abstract class ComputedPropertyInstance<T>
extends AbstractPropertyInstance<T>

ComputedPropertyInstance is the base implementation of Property.


Field Summary
 
Fields inherited from class org.qi4j.api.property.AbstractPropertyInstance
propertyInfo
 
Constructor Summary
protected ComputedPropertyInstance(Method accessor)
           
protected ComputedPropertyInstance(PropertyInfo aPropertyInfo)
          Construct an instance of ComputedPropertyInstance.
 
Method Summary
abstract  T get()
          This is the method to implement.
 void set(T anIgnoredValue)
          Throws IllegalArgumentException exception.
 
Methods inherited from class org.qi4j.api.property.AbstractPropertyInstance
equals, hashCode, isComputed, isImmutable, metaInfo, qualifiedName, type
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComputedPropertyInstance

protected ComputedPropertyInstance(PropertyInfo aPropertyInfo)
                            throws IllegalArgumentException
Construct an instance of ComputedPropertyInstance.

Parameters:
aPropertyInfo - The property info. This argument must not be null.
Throws:
IllegalArgumentException - Thrown if the specified aPropertyInfo argument is null.

ComputedPropertyInstance

protected ComputedPropertyInstance(Method accessor)
Method Detail

get

public abstract T get()
This is the method to implement.

Returns:
Returns null by default.

set

public void set(T anIgnoredValue)
         throws IllegalArgumentException,
                IllegalStateException
Throws IllegalArgumentException exception.

Parameters:
anIgnoredValue - This value is ignored.
Throws:
IllegalArgumentException - Thrown by default.
IllegalStateException - if the property is immutable or computed