net.sf.morph.reflect
Interface MutableIndexedContainerReflector
- All Superinterfaces:
- net.sf.composite.Component, ContainerReflector, IndexedContainerReflector, Reflector, SizableReflector
- All Known Implementing Classes:
- ArrayReflector, ListReflector, ServletRequestReflector, SimpleDelegatingReflector, StubbornDelegatingReflector
public interface MutableIndexedContainerReflector
- extends IndexedContainerReflector
A reflector for an indexed structure that allows modification of an element
at a given index. Most objects that are indexed are also "mutably indexed",
if you will, but some are not. Most notably, you can't change an
element at a specified index of a SortedSet because by virtue of adding
something new to the set you may be changing the indices of the elements.
- Since:
- Nov 26, 2004
- Author:
- Matt Sgarlata
Method Summary |
java.lang.Object |
set(java.lang.Object container,
int index,
java.lang.Object propertyValue)
Sets the element at the specified index. |
set
java.lang.Object set(java.lang.Object container,
int index,
java.lang.Object propertyValue)
throws ReflectionException
- Sets the element at the specified index. Valid indexes range between 0
and one less than the container object's size, inclusive.
- Parameters:
container
- the container objectindex
- a number indiciating which element should be setpropertyValue
- the value to be set
- Returns:
- the element previously at the specified position
- Throws:
ReflectionException
- if container
is null or
index
is not a valid index for the given
container object or
the object at the specified index could not be set for some
reason
Copyright © 2004-2008.