Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.progeeks.meta
Interface ListMutator  view ListMutator download ListMutator.java

All Superinterfaces:
PropertyMutator
All Known Implementing Classes:
AbstractListMutator, DefaultListMutator

public interface ListMutator
extends PropertyMutator

Extends PropertyMutator to provide access to the members of a multi-valued property value. This allows the mutator to properly manage list change notifications even if the actual storage object does not. For example, standard java.util.List based properties can't be expected to manage the complexities of element change notification, insertions, etc.. The mutator wraps this support around the real value.

Version:
$Revision: 1.2 $

Method Summary
 void add(int index, java.lang.Object object)
          Adds the object to the list value at the specified index.
 boolean add(java.lang.Object object)
          Adds the object to the list value, returning true if the contents of the list actually changed as a result of the operation.
 void clear()
          Clears the contents of the list value.
 java.lang.Object get(int index)
          Returns the object at the specified location.
 java.util.Iterator iterator()
          Returns an iterator over the elements in this list value.
 java.lang.Object remove(int index)
          Removes the object at the specified location and returns the locations value prior to removal.
 boolean remove(java.lang.Object object)
          Removes the specified object from the list value, returning true if the list contents were modified as a result of the action.
 java.lang.Object set(int index, java.lang.Object object)
          Replaces the value at the specified location.
 int size()
          Returns the number of elements in the list value.
 
Methods inherited from interface org.progeeks.meta.PropertyMutator
addPropertyChangeListener, getParentObject, getPropertyInfo, getPropertyName, getValue, removePropertyChangeListener, setValue
 

Method Detail

size

public int size()
Returns the number of elements in the list value.


add

public boolean add(java.lang.Object object)
Adds the object to the list value, returning true if the contents of the list actually changed as a result of the operation.


add

public void add(int index,
                java.lang.Object object)
Adds the object to the list value at the specified index.


get

public java.lang.Object get(int index)
Returns the object at the specified location.


iterator

public java.util.Iterator iterator()
Returns an iterator over the elements in this list value.


set

public java.lang.Object set(int index,
                            java.lang.Object object)
Replaces the value at the specified location.


remove

public java.lang.Object remove(int index)
Removes the object at the specified location and returns the locations value prior to removal.


remove

public boolean remove(java.lang.Object object)
Removes the specified object from the list value, returning true if the list contents were modified as a result of the action.


clear

public void clear()
Clears the contents of the list value.