CompoundPredicate

CompoundPredicate is an extension of Predicate. Use extensions of this class to make evaluations from logical combinations of sub-Predicates. Extensions for And, Or, and Not relations are provided.

Example:

CSOCondition<Boundary> cnd = new CSOCondition<Boundary>();
cnd.setDesc("An inlet or outlet boundary.");
CSOLookupConditionTrigger<Boundary> cndTrigger =
new CSOLookupConditionTrigger<Boundary>(Boundary.class);
cnd.setTriggers(Collections.singleton(cndTrigger));
Predicate<Boundary> inletPredicate = new Predicate<Boundary>() {
@Override
public boolean evaluate(Boundary boundary) {
if (boundary.getBoundaryType() instanceof InletBoundary) {
return true;
}
return false;
}
};
Predicate<Boundary> outletPredicate = new Predicate<Boundary>() {
@Override
public boolean evaluate(Boundary boundary) {
if (boundary.getBoundaryType() instanceof OutletBoundary) {
return true;
}
return false;
}
};
List<Predicate<Boundary>> predicates = new ArrayList<Predicate<Boundary>>();
predicates.add(inletPredicate);
predicates.add(outletPredicate);
cnd.setPredicate(new OrPredicate<Boundary>(predicates));

Online API:

For coding specifics, see the Simcenter STAR-CCM+ Help menu:

Help > Java API > star.common.filters > CompoundPredicate

Help > Java API > star.common.filters > AndPredicate

Help > Java API > star.common.filters > NonePredicate

Help > Java API > star.common.filters > OrPredicate