Package org.zkoss.pivot.impl
Class CalculatorContextSignature
- java.lang.Object
-
- org.zkoss.pivot.impl.CalculatorContextSignature
-
public class CalculatorContextSignature extends Object
An immutable object that express the requirement of the bottom level cache of TabularPivotModel.- Author:
- simonpai
-
-
Constructor Summary
Constructors Constructor Description CalculatorContextSignature(TabularPivotModel model)The default constructor, which determines the row/column fields, the data fields and the calculator context types required to build up the model cache.CalculatorContextSignature(TabularPivotModel model, PivotField[] extraDataFields, ContextType<?>[] extraContextTypes)Optionally provide extra data fields and/or extra calculator context types to secure in the requirement set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancovers(CalculatorContextSignature signature)Return true if this cover the other signature.ContextType<?>getCustomContextType(int index)intgetCustomContextTypeCount()ContextType<?>[]getCustomContextTypeRequirement()intgetDataFieldCount()Set<PivotField>getDataFieldRequirement()intgetIndexOf(ContextType<?> type)Return the ordinal of custom ContextType in this signature.Set<PivotField>getRowColumnFieldRequirement()boolean[]getStandardContextTypeRequirement()intgetTotalContextTypeCount()StringtoString()
-
-
-
Constructor Detail
-
CalculatorContextSignature
public CalculatorContextSignature(TabularPivotModel model)
The default constructor, which determines the row/column fields, the data fields and the calculator context types required to build up the model cache.
-
CalculatorContextSignature
public CalculatorContextSignature(TabularPivotModel model, PivotField[] extraDataFields, ContextType<?>[] extraContextTypes)
Optionally provide extra data fields and/or extra calculator context types to secure in the requirement set.- Parameters:
extraDataFields- can be nullextraContextTypes- can be null
-
-
Method Detail
-
getRowColumnFieldRequirement
public Set<PivotField> getRowColumnFieldRequirement()
-
getDataFieldRequirement
public Set<PivotField> getDataFieldRequirement()
-
getStandardContextTypeRequirement
public boolean[] getStandardContextTypeRequirement()
-
getCustomContextTypeRequirement
public ContextType<?>[] getCustomContextTypeRequirement()
-
getDataFieldCount
public int getDataFieldCount()
-
getCustomContextTypeCount
public int getCustomContextTypeCount()
-
getTotalContextTypeCount
public int getTotalContextTypeCount()
-
getCustomContextType
public ContextType<?> getCustomContextType(int index)
-
covers
public boolean covers(CalculatorContextSignature signature)
Return true if this cover the other signature.
-
getIndexOf
public int getIndexOf(ContextType<?> type)
Return the ordinal of custom ContextType in this signature.
-
-