package step.core; public class StepKindOfCondition extends StepCoreObjectCondition { private String entityName; private boolean withSubTypes; public StepKindOfCondition(String entityName, boolean withSubTypes) { this.entityName = entityName; this.withSubTypes = withSubTypes; } public StepKindOfCondition(String entityName) { this(entityName, true); } public boolean accept(StepCoreObject obj) { return withSubTypes ? obj.isKindOf(entityName):obj.isInstanceOf(entityName); } }