|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ValueStack
A central fixture of the Struts framework, the ValueStack
is a stack which contains the actions
which have executed in addition to other objects. Users can get and set values on the stack using expressions. The
ValueStack
will search down the stack starting with the most recent objects until it finds an object to
which the expression can apply.
Method Summary | ||
---|---|---|
ValueStack |
clone()
Creates a shallow copy of this stack. |
|
java.lang.Object |
get(java.lang.String expression)
Queries the stack. |
|
|
get(java.lang.String expression,
java.lang.Class<T> asType)
Queries the stack and converts the result to the specified type. |
|
java.lang.String |
getString(java.lang.String expression)
Queries the stack and converts the result to a String . |
|
java.lang.Object |
peek()
Gets the top, most recent object from the stack without changing the stack. |
|
java.lang.Object |
pop()
Removes the top, most recent object from the stack. |
|
void |
push(java.lang.Object o)
Pushes an object onto the stack. |
|
void |
set(java.lang.String expression,
java.lang.Object value)
Sets a value on an object from the stack. |
|
int |
size()
Returns the number of object on the stack. |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
java.lang.Object peek()
java.lang.Object pop()
void push(java.lang.Object o)
o
- ValueStack clone()
java.lang.Object get(java.lang.String expression)
null
if the expression doesn't apply to any
objects.
expression
-
<T> T get(java.lang.String expression, java.lang.Class<T> asType)
null
if the expression doesn't apply to any objects.
expression
- asType
- the type to convert the result to
java.lang.String getString(java.lang.String expression)
String
. Starts with the top, most recent object. If the
expression can apply to the object, this method returns the result of evaluating the expression converted to a
String
. If the expression does not apply, this method moves down the stack to the next object and
repeats. Returns null
if the expression doesn't apply to any objects.
expression
-
String
void set(java.lang.String expression, java.lang.Object value)
expression
- value
- int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |