com.apama.aggregates
Aggregate prior(TYPE d, integer index) TYPE


Parameters:
d - Operates on decimal, float, integer, string, boolean or location types.
index - The index into the window to return.
Deprecated:
Use nth with a negative value instead.
Return the window element that is the specified distance from the end of the window.

A positive (or zero) argument counts from the end of the window. A negative argument counts from the start of the window.

If there are too few items in the window to satisfy the index, then NaN is returned for float or decimal types. Otherwise a default-initialized value is returned.

nth(a, 0) is the same as first(a).

nth(a, -1), last(a) and prior(a, 0) are all the same.

All values in the window are treated identically, including NaN and other IEEE special values.
See Also:
com.apama.aggregates.nth - prior is equivalent to nth with a negative index.