Interface CellColorFunction<T>

Type Parameters:
T - the row data type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CellColorFunction<T>
Function that determines the background color for an individual cell based on its value and row data.

When set on a column, this function is called for each cell. If it returns a non-null ExcelColor, that color is applied as the cell's background, overriding both column-level backgroundColor and row-level rowColor.

  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable ExcelColor
    apply(@Nullable Object cellValue, T rowData)
    Determines the background color for a cell.
  • Method Details

    • apply

      @Nullable ExcelColor apply(@Nullable Object cellValue, T rowData)
      Determines the background color for a cell.
      Parameters:
      cellValue - the resolved cell value (may be null)
      rowData - the full row data object
      Returns:
      an ExcelColor to apply, or null for no override