- Type Parameters:
R
- the type of resources (e.g.Feature
) to filter.
@Classifier(ABSTRACT)
@UML(identifier="LogicalOperator",
specification=ISO_19143)
public interface LogicalOperator<R>
extends Filter<R>
Combination of one or more conditional expressions.
The logical operator AND evaluates to
true
if all the combined expressions evaluate to true.
The operator OR evaluates to true
is any of the combined expressions evaluate to true.
The NOT operator reverses the logical value of an expression.
The arity is determined the length of the operands list. If 1, this operator is an unary logic operator. If 2 or more, this operator is a binary logic operator. The length may be more than 2 if the AND or OR operation is repeated for all operands.
- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<Expression<? super R,
?>> Returns a view of filter operands as expressions havingBoolean
return values.Returns a list containing all of the child filters of this object.Returns the nature of the operator.
-
Method Details
-
getOperatorType
@UML(identifier="UnaryLogicOperator.operatorType, BinaryLogicOperator.operatorType", obligation=MANDATORY, specification=ISO_19143) LogicalOperatorName getOperatorType()Returns the nature of the operator.- Specified by:
getOperatorType
in interfaceFilter<R>
- Returns:
- the nature of the operator.
-
getExpressions
Returns a view of filter operands as expressions havingBoolean
return values. The expression list shall have the same size than the operands list. For each index i valid for the lists, the following relation shall hold:R any = ...; Object e = expressions.get(i).apply(any); Boolean f = filters.get(i).test(any); assert e.equals(f);
- Specified by:
getExpressions
in interfaceFilter<R>
- Returns:
- a view of operands list as expressions.
-
getOperands
@UML(identifier="UnaryLogicOperator.operands, BinaryLogicOperator.operands", obligation=MANDATORY, specification=ISO_19143) List<Filter<? super R>> getOperands()Returns a list containing all of the child filters of this object. This list will contain at least one element, and each element will be an instance ofFilter
.- Returns:
- all child filters used as operands.
-