1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package net.sf.morph.wrap;
17  
18  
19  /**
20   * A wrapper for an indexed container that allows modification of an element at
21   * a given index. Most objects that are indexed are also "mutably indexed", if
22   * you will, but some are not. Most notably, you can't change an element at a
23   * specified index of a SortedSet because by virtue of adding something new to
24   * the set you may be changing the indices of the elements.
25   * 
26   * @author Matt Sgarlata
27   * @since Jan 16, 2005
28   */
29  public interface MutableIndexedContainer extends IndexedContainer {
30  
31  	/**
32  	 * Sets the element at the specified index. Valid indexes range between 0
33  	 * and one less than the container object's size, inclusive.
34  	 * 
35  	 * @param index
36  	 *            a number indiciating which element should be set
37  	 * @param propertyValue
38  	 *            the value to be set
39  	 * @return the element previously at the specified position
40  	 * @throws WrapperException
41  	 *             if <code>index</code> is not a valid index for this
42  	 *             container object or <br>
43  	 *             the object at the specified index could not be set for some
44  	 *             reason
45  	 */
46  	public Object set(int index, Object propertyValue) throws WrapperException;
47  
48  }