public interface ColumnSummaryModel
A interface defining a class for providing summaries of numerical table columns: sum, average, minimum, maximum and minimum & maximum.
For instances use the
For instances use the
columnSummaryModel(SummaryValueProvider)
factory method.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Specifies a summary providerstatic interface
Provides the values on which to base the summary .static interface
ColumnSummaryModel.SummaryValues<T extends Number>
The values to base a summary on. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Number>
ColumnSummaryModelcolumnSummaryModel
(ColumnSummaryModel.SummaryValueProvider<T> valueProvider) Instantiates a newColumnSummaryModel
locked()
summary()
static <T extends Number>
ColumnSummaryModel.SummaryValues<T>summaryValues
(Collection<T> values, boolean subset) Instantiates a newColumnSummaryModel.SummaryValues
.
-
Method Details
-
locked
State locked()- Returns:
- the locked state, if true then changing summary type is disabled
-
summaries
List<ColumnSummaryModel.Summary> summaries()- Returns:
- a list containing the available summaries
-
summary
Value<ColumnSummaryModel.Summary> summary()- Returns:
- the value controlling the summary
-
summaryText
ValueObserver<String> summaryText()- Returns:
- an observer for the string representing the summary value
-
columnSummaryModel
static <T extends Number> ColumnSummaryModel columnSummaryModel(ColumnSummaryModel.SummaryValueProvider<T> valueProvider) Instantiates a newColumnSummaryModel
- Type Parameters:
T
- the value type- Parameters:
valueProvider
- the value provider- Returns:
- a new
ColumnSummaryModel
instance
-
summaryValues
static <T extends Number> ColumnSummaryModel.SummaryValues<T> summaryValues(Collection<T> values, boolean subset) Instantiates a newColumnSummaryModel.SummaryValues
.- Type Parameters:
T
- the value type- Parameters:
values
- the valuessubset
- true if the values are a subset of the available values- Returns:
- a new
ColumnSummaryModel.SummaryValues
instance.
-