org.qi4j.api.property
Interface Property<T>

All Superinterfaces:
PropertyInfo
All Known Subinterfaces:
AuthenticationMethod, LogType
All Known Implementing Classes:
AbstractPropertyInstance, ComputedPropertyInstance

public interface Property<T>
extends PropertyInfo

Properties are declared in Composite interfaces by using this interface. It creates a first-class object for the property from which you can get and set the value, and access any metadata about it. The type of the Property can be one of the following:


Method Summary
 T get()
          Get the value of the property.
 void set(T newValue)
          Set the value of the property
 
Methods inherited from interface org.qi4j.api.property.PropertyInfo
isComputed, isImmutable, metaInfo, qualifiedName, type
 

Method Detail

get

T get()
Get the value of the property.

Returns:
the value

set

void set(T newValue)
         throws IllegalArgumentException,
                IllegalStateException
Set the value of the property

Parameters:
newValue - the new value
Throws:
IllegalArgumentException - if the value has an invalid value
IllegalStateException - if the property is immutable or computed