Class ArrayEventContext
- java.lang.Object
-
- org.apache.tapestry5.internal.AbstractEventContext
-
- org.apache.tapestry5.internal.services.ArrayEventContext
-
- All Implemented Interfaces:
EventContext
public class ArrayEventContext extends AbstractEventContext
Simple implementation ofEventContext
.- Since:
- 5.1.0.0
-
-
Constructor Summary
Constructors Constructor Description ArrayEventContext(TypeCoercer typeCoercer, java.lang.Object... values)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(java.lang.Class<T> desiredType, int index)
Extracts a parameter value and coerces or decodes it to the desired type.int
getCount()
Returns the number of parameter values that can be extracted.-
Methods inherited from class org.apache.tapestry5.internal.AbstractEventContext
isEmpty, toString, toStrings, tryGet
-
-
-
-
Constructor Detail
-
ArrayEventContext
public ArrayEventContext(TypeCoercer typeCoercer, java.lang.Object... values)
-
-
Method Detail
-
get
public <T> T get(java.lang.Class<T> desiredType, int index)
Description copied from interface:EventContext
Extracts a parameter value and coerces or decodes it to the desired type.- Parameters:
desiredType
- the type of value requiredindex
- identifies which parameter value to extract- Returns:
- the value extracted and converted or coerced
-
getCount
public int getCount()
Description copied from interface:EventContext
Returns the number of parameter values that can be extracted.
-
-