|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
org.progeeks.meta.AbstractListMutator
public abstract class AbstractListMutator
Abstract implementation of ListMutator providing basic functionality for dealing with List values.
Subclasses are required to implement at least the get(int) and size() methods for read-only access.
For a modifiable list, set(int, object) should be overriden and for a resizble list, add(object) and remove(int) should be overridden. Otherwise, these methods throw UnsupportedOperation exception.
To support change notification, subclasses must provide an implementation of the firePropertyChangeEvent() method.
Note: this may eventually move to the meta package and be re-extended here just to provide the ability to do external change notifications.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
AbstractListMutator()
|
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.Object object)
Adds the object to the list value at the specified index. |
void |
clear()
Clears the contents of the list value. |
void |
fireElementsInserted(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
void |
fireElementsModified(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
void |
fireElementsRemoved(int first,
int last,
java.util.List original)
Sends an event to interested listeners that this property has had elements inserted. |
protected abstract void |
firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Implemented by subclasses to deliver a change event to the appropriately registered listeners. |
abstract java.lang.Object |
get(int index)
Returns the object at the specified location. |
java.lang.Object |
remove(int index)
Removes the object at the specified location and returns the locations value prior to removal. |
java.lang.Object |
set(int index,
java.lang.Object object)
Replaces the value at the specified location. |
abstract int |
size()
Returns the number of elements in the list value. |
| Methods inherited from class java.util.AbstractList |
|---|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.progeeks.meta.PropertyMutator |
|---|
addPropertyChangeListener, getParentObject, getPropertyInfo, getPropertyName, getValue, removePropertyChangeListener, setValue |
| Methods inherited from interface org.progeeks.util.ObservableList |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface java.util.List |
|---|
add, addAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
| Constructor Detail |
|---|
public AbstractListMutator()
| Method Detail |
|---|
public abstract int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class java.util.AbstractCollectionpublic abstract java.lang.Object get(int index)
get in interface java.util.Listget in class java.util.AbstractList
public void add(int index,
java.lang.Object object)
add in interface java.util.Listadd in class java.util.AbstractListjava.lang.UnsupportedOperationException - if the list value does
not support insertions.
public java.lang.Object set(int index,
java.lang.Object object)
set in interface java.util.Listset in class java.util.AbstractListjava.lang.UnsupportedOperationException - if the list value does
not support replacing elements.public java.lang.Object remove(int index)
remove in interface java.util.Listremove in class java.util.AbstractListjava.lang.UnsupportedOperationException - if the list value does
not support removes.public void clear()
clear in interface java.util.Collectionclear in interface java.util.Listclear in class java.util.AbstractListjava.lang.UnsupportedOperationException - if the list value does
not support being cleared.protected abstract void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
public void fireElementsInserted(int first,
int last,
java.util.List original)
public void fireElementsModified(int first,
int last,
java.util.List original)
public void fireElementsRemoved(int first,
int last,
java.util.List original)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||