com.miginfocom.property
Class PropertyInfo<T>

java.lang.Object
  extended by com.miginfocom.property.PropertyInfo<T>
Direct Known Subclasses:
FieldPropertyInfo

public class PropertyInfo<T>
extends java.lang.Object

Static information about a property.

Sub classes should always be immutable since this class is typically cached.

See Also:
BeanProperty

Constructor Summary
PropertyInfo(Transfer set, Transfer get, boolean modifiable, FirePolicy fire, java.util.List<? extends Validator<T>> validators, java.lang.String[] groups, boolean observable)
          Constructor.
 
Method Summary
 FirePolicy getFirePolicy()
          The policy how to compare old and new values to know when to fire change events.
 Transfer getGetPolicy()
          The policy for get operations.
 java.util.List<java.lang.String> getGroups()
          The groups this property belongs to.
 Transfer getSetPolicy()
          The policy for set operations.
 java.util.List<? extends Validator<T>> getValidators()
          Returns the validators.
 boolean hasValidators()
          Returns if there is at least one validator.
 boolean isGroup(java.lang.String s)
          Returns if this property info describe a property belonging to s is
 boolean isModifiable()
          If the value's content can be changes.
 boolean isObservable()
          Returns if this property's value can be observed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyInfo

public PropertyInfo(Transfer set,
                    Transfer get,
                    boolean modifiable,
                    FirePolicy fire,
                    java.util.List<? extends Validator<T>> validators,
                    java.lang.String[] groups,
                    boolean observable)
Constructor.

Parameters:
set - The policy for set operations. Never null.
get - The policy for get operations. Never null.
modifiable - If the value's content can be changes. For instance the add and remove for a CollectionProperty.
fire - The policy how to compare old and new values to know when to fire change events. Never null.
validators - Optinal validators. May be null if no vaidators.
groups - Optinal goups. May be null if no vaidators.
observable - If this property's value can be observed. If true then Property.addPropertyListener(net.java.properties.PropertyListener) and Property.removePropertyListener(net.java.properties.PropertyListener) must be implmented.
Method Detail

getSetPolicy

public final Transfer getSetPolicy()
The policy for set operations.

Returns:
The policy for set operations. Never null.

getGetPolicy

public final Transfer getGetPolicy()
The policy for get operations.

Returns:
The policy for get operations. Never null.

isModifiable

public final boolean isModifiable()
If the value's content can be changes. For instance the add and remove for a CollectionProperty.

Returns:
If the value's content can be changes.

hasValidators

public final boolean hasValidators()
Returns if there is at least one validator.

Returns:
If there is at least one validator.

getValidators

public final java.util.List<? extends Validator<T>> getValidators()
Returns the validators. List is unmodifiable.

Returns:
The validators. Never null.

getGroups

public final java.util.List<java.lang.String> getGroups()
The groups this property belongs to. List is unmodifiable.

Returns:
The groups this property belongs to. Never null.

getFirePolicy

public final FirePolicy getFirePolicy()
The policy how to compare old and new values to know when to fire change events.

Returns:
The policy how to compare old and new values to know when to fire change events. Never null.

isObservable

public boolean isObservable()
Returns if this property's value can be observed. If this method returns true then Property.addPropertyListener(net.java.properties.PropertyListener) and Property.removePropertyListener(net.java.properties.PropertyListener) must be implmented. If this method return false those methods should return UnsupportedOperationException.

Returns:
If this property's value can be observed.

isGroup

public final boolean isGroup(java.lang.String s)
Returns if this property info describe a property belonging to s is

Parameters:
s - The name of the group to test. Not null.
Returns:
If this property info describe a property belonging to s is


Copyright © 2007 MiG InfoCom AB. All Rights Reserved.