Module is.codion.common.model
Package is.codion.common.model.condition
Interface TableConditions.Builder<C>
- Type Parameters:
C- the condition identifier type
- Enclosing interface:
TableConditions<C>
public static interface TableConditions.Builder<C>
Builds a
TableConditions, providing a condition model for each identifier, initialized with its defaults.-
Method Summary
Modifier and TypeMethodDescriptionbuild()<T> TableConditions.Builder<C> condition(C identifier, Consumer<ConditionModel.Builder<T>> condition) Configures the condition model for the given identifier, the builder received being initialized with its defaults.Excludes the given conditions, no condition model being created for them.
-
Method Details
-
exclude
Excludes the given conditions, no condition model being created for them.- Parameters:
identifiers- the identifiers of the conditions to exclude- Returns:
- this builder
-
condition
<T> TableConditions.Builder<C> condition(C identifier, Consumer<ConditionModel.Builder<T>> condition) Configures the condition model for the given identifier, the builder received being initialized with its defaults. Replaces any previous configuration of the given identifier.- Type Parameters:
T- the condition value type- Parameters:
identifier- the condition identifiercondition- configures the condition model builder- Returns:
- this builder
-
build
TableConditions<C> build()- Returns:
- a new
TableConditionsinstance - Throws:
IllegalArgumentException- in case an excluded or configured identifier has no condition model, or is both excluded and configured
-