net.sourceforge.stripes.util.bean
Class ArrayPropertyAccessor
java.lang.Object
net.sourceforge.stripes.util.bean.ArrayPropertyAccessor
- All Implemented Interfaces:
- PropertyAccessor<Object>
public class ArrayPropertyAccessor
- extends Object
- implements PropertyAccessor<Object>
Implementation of the PropertyAccessor
interface for interacting with arrays.
Throws exceptions if the index is not an integer or if the index is out of range
for the current array.
- Since:
- Stripes 1.4
- Author:
- Tim Fennell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayPropertyAccessor
public ArrayPropertyAccessor()
getValue
public Object getValue(NodeEvaluation evaluation,
Object target)
- Gets the index specified by the current node from the target array.
- Specified by:
getValue
in interface PropertyAccessor<Object>
- Parameters:
evaluation
- the current NodeEvaluation containing the array indextarget
- the target array
- Returns:
- the element stored at that index
setValue
public void setValue(NodeEvaluation evaluation,
Object target,
Object value)
- Sets the value at the index specified by the current node to the supplied value.
- Specified by:
setValue
in interface PropertyAccessor<Object>
- Parameters:
evaluation
- the current NodeEvaluation containing the array indextarget
- the target arrayvalue
- the value to set, possibly null
? Copyright 2005-2006, Stripes Development Team.