java.lang.Object
org.bigraphs.framework.core.reactivesystem.ReactiveSystemPredicate<B>
org.bigraphs.framework.simulation.modelchecking.predicates.OrPredicate<B>
public class OrPredicate<B extends Bigraph<? extends Signature<?>>>
extends ReactiveSystemPredicate<B>
A composite predicate which concatenates all given predicates with the or operator.
- Author:
- Dominik Grzelak
-
Field Summary
Fields inherited from class org.bigraphs.framework.core.reactivesystem.ReactiveSystemPredicate
label, negate
-
Constructor Summary
ConstructorDescriptionOrPredicate
(boolean negate, ReactiveSystemPredicate<B>... predicates) OrPredicate
(ReactiveSystemPredicate<B>... predicates) OrPredicate
(ReactiveSystemPredicate<B> predicateA, ReactiveSystemPredicate<B> predicateB) OrPredicate
(ReactiveSystemPredicate<B> predicateA, ReactiveSystemPredicate<B> predicateB, boolean negate) -
Method Summary
Modifier and TypeMethodDescriptionGet the bigraph used in the predicate.boolean
Concatenates all given predicates with the or operator of theReactiveSystemPredicate
class and evaluates them together.Methods inherited from class org.bigraphs.framework.core.reactivesystem.ReactiveSystemPredicate
getLabel, isNegate, setNegate, withLabel
-
Constructor Details
-
OrPredicate
-
OrPredicate
public OrPredicate(ReactiveSystemPredicate<B> predicateA, ReactiveSystemPredicate<B> predicateB, boolean negate) -
OrPredicate
-
OrPredicate
-
-
Method Details
-
getBigraph
Description copied from class:ReactiveSystemPredicate
Get the bigraph used in the predicate. If the predicate is a conditional predicate, the methid returnsnull
.- Specified by:
getBigraph
in classReactiveSystemPredicate<B extends Bigraph<? extends Signature<?>>>
- Returns:
- the underlying bigraph of the predicate, or
null
for conditional predicates.
-
test
Concatenates all given predicates with the or operator of theReactiveSystemPredicate
class and evaluates them together.Note: if the predicate set is empty,
true
will be returned also.- Specified by:
test
in interfacePredicate<B extends Bigraph<? extends Signature<?>>>
- Specified by:
test
in classReactiveSystemPredicate<B extends Bigraph<? extends Signature<?>>>
- Parameters:
agent
- the current state of a transition system of a BRS to test the predicate against- Returns:
true
, if the consolidated predicates evaluate totrue
(or predicate list is empty), otherwisefalse
.
-