|
|||||||||
| Home >> All >> org >> progeeks >> [ meta overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.progeeks.meta
Class DefaultListMutator

java.lang.Objectorg.progeeks.meta.AbstractListMutator
org.progeeks.meta.DefaultListMutator
- All Implemented Interfaces:
- ListMutator, PropertyMutator
- Direct Known Subclasses:
- AbstractMetaObject.BaseListMutator
- public abstract class DefaultListMutator
- extends AbstractListMutator
- implements ListMutator
- extends AbstractListMutator
A default implementation of ListMutator that will work with any MetaObject, given certain restrictions. It can be used as an implementation on its own or subclassed to provide performance improvements in metakit implementation specific cases. Subclasses must implement the firePropertyChangeEvent() event method to support delivery of list change events.
- Version:
- $Revision: 1.2 $
| Nested Class Summary |
| Nested classes inherited from class org.progeeks.meta.AbstractListMutator |
|
| Field Summary | |
private MetaObject |
metaObject
|
private java.lang.String |
propertyName
|
| Constructor Summary | |
DefaultListMutator(java.lang.String propertyName,
MetaObject metaObject)
|
|
| Method Summary | |
void |
add(int index,
java.lang.Object object)
Adds the object to the list value at the specified index. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the specified PropertyChangeListener to this mutator. |
protected abstract void |
firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Implemented by subclasses to deliver a change event to the appropriately registered listeners. |
java.lang.Object |
get(int index)
Returns the object at the specified location. |
protected java.util.List |
getListValue()
|
MetaObject |
getParentObject()
Returns the object that contains this property. |
PropertyInfo |
getPropertyInfo()
Returns the info associated with this property. |
java.lang.String |
getPropertyName()
Returns the name of this property. |
java.lang.Object |
getValue()
Returns the value of this property. |
java.lang.Object |
remove(int index)
Removes the object at the specified location and returns the locations value prior to removal. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the specified PropertyChangeListener from this mutator. |
java.lang.Object |
set(int index,
java.lang.Object object)
Replaces the value at the specified location. |
void |
setValue(java.lang.Object value)
Resets the value of this property. |
int |
size()
Returns the number of elements in the list value. |
| Methods inherited from class org.progeeks.meta.AbstractListMutator |
add, clear, fireElementsInserted, fireElementsModified, fireElementsRemoved, iterator, remove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.progeeks.meta.ListMutator |
add, clear, iterator, remove |
| Field Detail |
propertyName
private java.lang.String propertyName
metaObject
private MetaObject metaObject
| Constructor Detail |
DefaultListMutator
public DefaultListMutator(java.lang.String propertyName, MetaObject metaObject)
| Method Detail |
getPropertyName
public java.lang.String getPropertyName()
- Returns the name of this property.
- Specified by:
getPropertyNamein interfacePropertyMutator
getParentObject
public MetaObject getParentObject()
- Returns the object that contains this property.
- Specified by:
getParentObjectin interfacePropertyMutator
getPropertyInfo
public PropertyInfo getPropertyInfo()
- Returns the info associated with this property.
- Specified by:
getPropertyInfoin interfacePropertyMutator
getValue
public java.lang.Object getValue()
- Returns the value of this property.
- Specified by:
getValuein interfacePropertyMutator
setValue
public void setValue(java.lang.Object value)
- Resets the value of this property.
- Specified by:
setValuein interfacePropertyMutator
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Adds the specified PropertyChangeListener to this
mutator.
- Specified by:
addPropertyChangeListenerin interfacePropertyMutator
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
- Removes the specified PropertyChangeListener from this
mutator.
- Specified by:
removePropertyChangeListenerin interfacePropertyMutator
getListValue
protected java.util.List getListValue()
size
public int size()
- Description copied from interface:
ListMutator - Returns the number of elements in the list value.
- Specified by:
sizein interfaceListMutator- Specified by:
sizein classAbstractListMutator
add
public void add(int index,
java.lang.Object object)
- Description copied from interface:
ListMutator - Adds the object to the list value at the specified index.
- Specified by:
addin interfaceListMutator- Overrides:
addin classAbstractListMutator
set
public java.lang.Object set(int index, java.lang.Object object)
- Description copied from interface:
ListMutator - Replaces the value at the specified location.
- Specified by:
setin interfaceListMutator- Overrides:
setin classAbstractListMutator
remove
public java.lang.Object remove(int index)
- Description copied from interface:
ListMutator - Removes the object at the specified location and returns
the locations value prior to removal.
- Specified by:
removein interfaceListMutator- Overrides:
removein classAbstractListMutator
get
public java.lang.Object get(int index)
- Description copied from interface:
ListMutator - Returns the object at the specified location.
- Specified by:
getin interfaceListMutator- Specified by:
getin classAbstractListMutator
firePropertyChangeEvent
protected abstract void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
- Description copied from class:
AbstractListMutator - Implemented by subclasses to deliver a change event to
the appropriately registered listeners.
- Specified by:
firePropertyChangeEventin classAbstractListMutator
|
|||||||||
| Home >> All >> org >> progeeks >> [ meta overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC