Package org.zkoss.pivot.impl.calc
Class MinMaxContext
- java.lang.Object
-
- org.zkoss.pivot.impl.calc.MinMaxContext
-
- All Implemented Interfaces:
Context<MinMaxContext>
public class MinMaxContext extends Object implements Context<MinMaxContext>
The context that keeps track of the MAX and MIN value of the items.- Author:
- simonpai
-
-
Field Summary
Fields Modifier and Type Field Description protected Numbers.MixedTypedNumber
_max
protected Numbers.MixedTypedNumber
_min
static ContextFactory<MinMaxContext>
FACTORY
-
Constructor Summary
Constructors Constructor Description MinMaxContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Object item)
Add an item into the aggregation.Number
getMax()
Retrieve MAX.Number
getMin()
Retrieve MIN.void
merge(MinMaxContext ctx)
Merge from another context of the same type.
-
-
-
Field Detail
-
_max
protected Numbers.MixedTypedNumber _max
-
_min
protected Numbers.MixedTypedNumber _min
-
FACTORY
public static final ContextFactory<MinMaxContext> FACTORY
-
-
Method Detail
-
add
public void add(Object item)
Description copied from interface:Context
Add an item into the aggregation.- Specified by:
add
in interfaceContext<MinMaxContext>
-
merge
public void merge(MinMaxContext ctx)
Description copied from interface:Context
Merge from another context of the same type.- Specified by:
merge
in interfaceContext<MinMaxContext>
-
getMax
public Number getMax()
Retrieve MAX.
-
getMin
public Number getMin()
Retrieve MIN.
-
-