ConditionalFormattingEvaluator. This references a rule, its owning
ConditionalFormatting, its priority order (lower index = higher priority in Excel),
and the information needed to evaluate the rule for a given cell.
Having this all combined and cached avoids repeated access calls to the underlying structural objects, XSSF CT* objects and HSSF raw byte structures. Those objects can be referenced from here. This object will be out of sync if anything modifies the referenced structures' evaluation properties.
The assumption is that consuming applications will read the display properties once and create whatever style objects they need, caching those at the application level. Thus this class only caches values needed for evaluation, not display.
| Modifier and Type | Class and Description |
|---|---|
| protected static class | EvaluationConditionalFormatRule.
Note this class has a natural ordering that is inconsistent with equals. |
| Modifier and Type | Field and Description |
|---|---|
| private final DecimalFormat | |
| private final ConditionalFormatting | |
| private final int | |
| private final String | |
| private final String | |
| private final String | |
| private final Map | meaningfulRegionValues
Depending on the rule type, it may want to know about certain values in the region when evaluating |
| private final ExcelNumberFormat | |
| private final OperatorEnum | |
| private final int | |
| private final CellRangeAddress[] | |
| private final ConditionalFormattingRule | |
| private final int | |
| private final Sheet | |
| private final String | |
| private CellRangeAddress | |
| private final ConditionType | |
| private final WorkbookEvaluator |
| Access | Constructor and Description |
|---|---|
| public | EvaluationConditionalFormatRule(WorkbookEvaluator workbookEvaluator, Sheet sheet, ConditionalFormatting formatting, int
for priority, zero based formattingIndex, ConditionalFormattingRule rule, int for priority, zero based, if this is an HSSF rule. Unused for XSSF rules ruleIndex, CellRangeAddress[] could be read from formatting, but every call creates new objects in a new array.
this allows calling it once per formatting instance, and re-using the array. regions)
|
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private boolean | Returns: true/false using the same rules as Data Validation evaluationsneeded for offsets from region anchor - may be null! ref, CellRangeAddress for adjusting relative formulas region)
|
| private boolean | Returns: if the value of the cell is valid or not for the formatting rulethe cell to check for cell, CellRangeAddress for adjusting relative formulas region)
|
| public int | Returns: comparison based on sheet name, formatting index, and rule prioritythe object to be compared. o)Implements java. Per Excel Help, XSSF rule priority is sheet-wide, not just within the owning ConditionalFormatting object. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Defined as equal sheet name and formatting and rule indexes |
| private Set | |
| public Set | |
| private Set | |
| private Set | |
| private EvaluationConditionalFormatRule. | |
| public ConditionalFormatting | |
| public int | |
| public String | |
| public String | |
| private Set | Returns: the meaningful values in the range of cells specifiedinstances evaluate the values for a region and return the positive matches for the function type. funcfrom testing, Excel only operates on numbers and dates (which are stored as numbers) in the range. |
| public ExcelNumberFormat | Returns: Excel number format string to apply to matching cells, or null to keep the cell default
|
| public OperatorEnum | |
| public int | |
| public CellRangeAddress[] | |
| public ConditionalFormattingRule | |
| public int | |
| public Sheet | |
| public String | |
| public ConditionType | |
| public int | |
| pack-priv boolean | |
| private ValueEval |
| decimalTextFormat | back to summary |
|---|---|
| private final DecimalFormat decimalTextFormat | |
| formatting | back to summary |
|---|---|
| private final ConditionalFormatting formatting | |
| formattingIndex | back to summary |
|---|---|
| private final int formattingIndex | |
| formula1 | back to summary |
|---|---|
| private final String formula1 | |
| formula2 | back to summary |
|---|---|
| private final String formula2 | |
| lowerText | back to summary |
|---|---|
| private final String lowerText | |
| meaningfulRegionValues | back to summary |
|---|---|
| private final Map<CellRangeAddress, Set<EvaluationConditionalFormatRule. Depending on the rule type, it may want to know about certain values in the region when evaluating | |
| numberFormat | back to summary |
|---|---|
| private final ExcelNumberFormat numberFormat | |
| operator | back to summary |
|---|---|
| private final OperatorEnum operator | |
| priority | back to summary |
|---|---|
| private final int priority | |
| regions | back to summary |
|---|---|
| private final CellRangeAddress[] regions | |
| rule | back to summary |
|---|---|
| private final ConditionalFormattingRule rule | |
| ruleIndex | back to summary |
|---|---|
| private final int ruleIndex | |
| sheet | back to summary |
|---|---|
| private final Sheet sheet | |
| text | back to summary |
|---|---|
| private final String text | |
| topLeftRegion | back to summary |
|---|---|
| private CellRangeAddress topLeftRegion | |
| type | back to summary |
|---|---|
| private final ConditionType type | |
| workbookEvaluator | back to summary |
|---|---|
| private final WorkbookEvaluator workbookEvaluator | |
| EvaluationConditionalFormatRule | back to summary |
|---|---|
public EvaluationConditionalFormatRule(WorkbookEvaluator workbookEvaluator, Sheet sheet, ConditionalFormatting formatting, int formattingIndex, ConditionalFormattingRule rule, int ruleIndex, CellRangeAddress[] regions)
| |
| checkFilter | back to summary |
|---|---|
| private boolean checkFilter(Cell cell, CellReference ref, CellRangeAddress region) | |
| checkFormula | back to summary |
|---|---|
private boolean checkFormula(CellReference ref, CellRangeAddress region)
| |
| checkValue | back to summary |
|---|---|
private boolean checkValue(Cell cell, CellRangeAddress region)
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(EvaluationConditionalFormatRule o) Implements java. Per Excel Help, XSSF rule priority is sheet-wide, not just within the owning ConditionalFormatting object. This can be seen by creating 4 rules applying to two different ranges and examining the XML. HSSF priority is based on definition/persistence order.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Defined as equal sheet name and formatting and rule indexes
| |
| evaluateAboveAverage | back to summary |
|---|---|
| private Set | |
| evaluateDuplicateValues | back to summary |
|---|---|
| public Set | |
| evaluateTop10 | back to summary |
|---|---|
| private Set | |
| evaluateUniqueValues | back to summary |
|---|---|
| private Set | |
| getCellValue | back to summary |
|---|---|
| private EvaluationConditionalFormatRule. | |
| getFormatting | back to summary |
|---|---|
public ConditionalFormatting getFormatting()
| |
| getFormattingIndex | back to summary |
|---|---|
public int getFormattingIndex()
| |
| getFormula1 | back to summary |
|---|---|
public String getFormula1()
| |
| getFormula2 | back to summary |
|---|---|
public String getFormula2()
| |
| getMeaningfulValues | back to summary |
|---|---|
| private Set from testing, Excel only operates on numbers and dates (which are stored as numbers) in the range. numbers stored as text are ignored, but numbers formatted as text are treated as numbers.
| |
| getNumberFormat | back to summary |
|---|---|
public ExcelNumberFormat getNumberFormat()
| |
| getOperator | back to summary |
|---|---|
public OperatorEnum getOperator()
| |
| getPriority | back to summary |
|---|---|
public int getPriority()
| |
| getRegions | back to summary |
|---|---|
public CellRangeAddress[] getRegions()
| |
| getRule | back to summary |
|---|---|
public ConditionalFormattingRule getRule()
| |
| getRuleIndex | back to summary |
|---|---|
public int getRuleIndex()
| |
| getSheet | back to summary |
|---|---|
public Sheet getSheet()
| |
| getText | back to summary |
|---|---|
public String getText()
| |
| getType | back to summary |
|---|---|
public ConditionType getType()
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| matches | back to summary |
|---|---|
pack-priv boolean matches(CellReference ref)
| |
| unwrapEval | back to summary |
|---|---|
| private ValueEval unwrapEval(ValueEval eval) | |
Note
this class has a natural ordering that is inconsistent with equals.
| Modifier and Type | Field and Description |
|---|---|
| private final DecimalFormat | |
| private final String | |
| private final String | |
| private final Double |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: value comparisonthe object to be compared. oImplements java. Note this class has a natural ordering that is inconsistent with equals. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public Double | |
| public int | |
| public boolean | |
| public String |
| decimalTextFormat | back to summary |
|---|---|
| private final DecimalFormat decimalTextFormat | |
| format | back to summary |
|---|---|
| private final String format | |
| string | back to summary |
|---|---|
| private final String string | |
| value | back to summary |
|---|---|
| private final Double value | |
| ValueAndFormat | back to summary |
|---|---|
| public ValueAndFormat(Double value, String format, DecimalFormat df) | |
| ValueAndFormat | back to summary |
|---|---|
| public ValueAndFormat(String value, String format) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(EvaluationConditionalFormatRule. Implements java. Note this class has a natural ordering that is inconsistent with equals.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getString | back to summary |
|---|---|
| public String getString() | |
| getValue | back to summary |
|---|---|
| public Double getValue() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isNumber | back to summary |
|---|---|
| public boolean isNumber() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |