- Type Parameters:
T
- the condition value type
- All Known Subinterfaces:
ForeignKeyConditionModel
,SwingForeignKeyConditionModel
public interface ConditionModel<T>
Specifies a condition with an operator and operands as well as relevant events and states.
For instances create a
ConditionModel.Builder
via builder(Class)
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Builds aConditionModel
instance.static interface
Provides condition operands.static interface
Provides a way to set the condition.static enum
The possible wildcard types -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue
<Boolean> Specifies whether string based conditions are case-sensitive by default Value type: Boolean Default value: falsestatic final PropertyValue
<ConditionModel.Wildcard> Specifies whether wildcards are added to string values Value type:ConditionModel.Wildcard
Default value:ConditionModel.Wildcard.POSTFIX
static final String
The wildcard character -
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(@Nullable Comparable<T> value) Returns true if the given value is accepted by this models condition.static <T> ConditionModel.Builder
<T> Returns a newConditionModel.Builder
instance.Observer
<?> changed()
void
clear()
Clears this condition model, that is, disables it, clears all operands and sets the operator to the initial one.enabled()
format()
locked()
operands()
operator()
set()
-
Field Details
-
WILDCARD_CHARACTER
The wildcard character- See Also:
-
WILDCARD
Specifies whether wildcards are added to string values- Value type:
ConditionModel.Wildcard
- Default value:
ConditionModel.Wildcard.POSTFIX
- Value type:
-
CASE_SENSITIVE
Specifies whether string based conditions are case-sensitive by default- Value type: Boolean
- Default value: false
-
-
Method Details
-
caseSensitive
State caseSensitive()- Returns:
- the
State
controlling whether this model is case-sensitive, when working with strings
-
format
-
dateTimePattern
- Returns:
- the date/time format pattern to use when presenting a temporal value, an empty
Optional
in case none is available
-
autoEnable
State autoEnable()- Returns:
- the
State
controlling whether this model is enabled automatically when a condition value is specified
-
locked
State locked()- Returns:
- the
State
controlling the locked status
-
valueClass
- Returns:
- the value class this condition model is based on
-
operators
- Returns:
- the operators available in this condition model
-
enabled
State enabled()- Returns:
- a state controlling the enabled status
-
clear
void clear()Clears this condition model, that is, disables it, clears all operands and sets the operator to the initial one.- See Also:
-
operator
- Returns:
- a
Value
controlling on the operator
-
operands
ConditionModel.Operands<T> operands()- Returns:
- the operands
-
set
ConditionModel.SetCondition<T> set()- Returns:
- the
ConditionModel.SetCondition
instance
-
accepts
Returns true if the given value is accepted by this models condition.- Parameters:
value
- the value- Returns:
- true if the given value is accepted by this models condition
-
changed
Observer<?> changed()- Returns:
- an observer notified each time the condition changes
-
builder
Returns a newConditionModel.Builder
instance.- Type Parameters:
T
- the condition value type- Parameters:
valueClass
- the value class- Returns:
- a new
ConditionModel.Builder
instance
-