com.espertech.esper.epl.agg.access
Class AggregationAccessorLast

java.lang.Object
  extended by com.espertech.esper.epl.agg.access.AggregationAccessorLast
All Implemented Interfaces:
AggregationAccessor

public class AggregationAccessorLast
extends java.lang.Object
implements AggregationAccessor

Represents the aggregation accessor that provides the result for the "last" aggregation function without index.


Constructor Summary
AggregationAccessorLast(int streamNum, ExprEvaluator childNode)
          Ctor.
 
Method Summary
 EventBean getEnumerableEvent(AggregationState state)
          Return the aggregation state value consisting of a single event.
 java.util.Collection<EventBean> getEnumerableEvents(AggregationState state)
          Return the aggregation state value consisting of a collection of events.
 java.lang.Object getValue(AggregationState state)
          Return the aggregation state value either as a scalar value or any other object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationAccessorLast

public AggregationAccessorLast(int streamNum,
                               ExprEvaluator childNode)
Ctor.

Parameters:
streamNum - stream id
childNode - expression
Method Detail

getValue

public java.lang.Object getValue(AggregationState state)
Description copied from interface: AggregationAccessor
Return the aggregation state value either as a scalar value or any other object.

For enumeration over scalar values or objects return an array or collection of scalar or object values.

Use the #getEnumerableEvents method to return a collection of events.

Use the #getEnumerableEvent to return a single events.

Specified by:
getValue in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
Returns:
return value

getEnumerableEvents

public java.util.Collection<EventBean> getEnumerableEvents(AggregationState state)
Description copied from interface: AggregationAccessor
Return the aggregation state value consisting of a collection of events.

Specified by:
getEnumerableEvents in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
Returns:
return collection of events or null or empty collection

getEnumerableEvent

public EventBean getEnumerableEvent(AggregationState state)
Description copied from interface: AggregationAccessor
Return the aggregation state value consisting of a single event.

Specified by:
getEnumerableEvent in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
Returns:
return event or null

© 2006-2014 EsperTech Inc.
All rights reserved.
Visit us at espertech.com