/** * Returns true if the contained condition returns false. * * This implies that it returns false if the contained condition is null. * * @param element the object to be evaluated. * @return true if the contained condition returns false. */ @Override public boolean isTrue(Object element) { if(condition != null) { return !condition.isTrue(element); } return false; }
@Override public Not clone() throws CloneNotSupportedException { Not result = (Not) super.clone(); if(result.condition != null) { result.condition = result.condition.clone(); } return result; }
/** * Returns true if the contained condition returns false. * * This implies that it returns false if the contained condition is null. * * @param element the object to be evaluated. * @return true if the contained condition returns false. */ @Override public boolean isTrue(Object element) { if(condition != null) { return !condition.isTrue(element); } return false; }
@Override public Not clone() throws CloneNotSupportedException { Not result = (Not) super.clone(); if(result.condition != null) { result.condition = result.condition.clone(); } return result; }
/** * Returns true if any of the contained conditions is true. * * This implies that it returns false if the contained conditions are either null or empty. * * @param element the object to be evaluated. * @return true if any of the contained conditions is true. */ @Override public boolean isTrue(Object element) { if(conditions != null) { for(Condition condition : conditions) { if(condition.isTrue(element)) { return true; } } } return false; }
@Override public Or clone() throws CloneNotSupportedException { Or result = (Or) super.clone(); if(result.conditions != null) { List<Condition> clonedConditions = new ArrayList<>(conditions.size()); for(Condition condition : result.conditions) { clonedConditions.add(condition.clone()); } result.conditions = clonedConditions; } return result; }
/** * Returns false if any of the contained conditions is false. * * This implies that it returns true if the contained conditions are either null or empty. * * @param element the object to be evaluated. * @return false if any of the contained conditions is false. */ @Override public boolean isTrue(Object element) { if(conditions != null) { for(Condition condition : conditions) { if(!condition.isTrue(element)) { return false; } } } return true; }
@Override public And clone() throws CloneNotSupportedException { And result = (And) super.clone(); if(result.conditions != null) { List<Condition> clonedConditions = new ArrayList<>(conditions.size()); for(Condition condition : result.conditions) { clonedConditions.add(condition.clone()); } result.conditions = clonedConditions; } return result; }
/** * Returns false if any of the contained conditions is false. * * This implies that it returns true if the contained conditions are either null or empty. * * @param element the object to be evaluated. * @return false if any of the contained conditions is false. */ @Override public boolean isTrue(Object element) { if(conditions != null) { for(Condition condition : conditions) { if(!condition.isTrue(element)) { return false; } } } return true; }
@Override public Or clone() throws CloneNotSupportedException { Or result = (Or) super.clone(); if(result.conditions != null) { List<Condition> clonedConditions = new ArrayList<>(conditions.size()); for(Condition condition : result.conditions) { clonedConditions.add(condition.clone()); } result.conditions = clonedConditions; } return result; }
/** * Returns true if any of the contained conditions is true. * * This implies that it returns false if the contained conditions are either null or empty. * * @param element the object to be evaluated. * @return true if any of the contained conditions is true. */ @Override public boolean isTrue(Object element) { if(conditions != null) { for(Condition condition : conditions) { if(condition.isTrue(element)) { return true; } } } return false; }
@Override public And clone() throws CloneNotSupportedException { And result = (And) super.clone(); if(result.conditions != null) { List<Condition> clonedConditions = new ArrayList<>(conditions.size()); for(Condition condition : result.conditions) { clonedConditions.add(condition.clone()); } result.conditions = clonedConditions; } return result; }
return condition.isTrue(o);
public void internalTestCloneEquals(Condition condition) throws CloneNotSupportedException { Condition clone = condition.clone(); internalTestEquals(condition, clone); }
if(current != null && condition.isTrue(current))
if(current != null && condition.isTrue(current))