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 Details

    • 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 null
      extraContextTypes - can be null
  • Method Details

    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object