/** * Check not pre-parsed condition of reference (old version) * @param condition condition to check for matching * @param ref contract to check for matching * @param contracts contract list to check for matching * @param iteration check inside references iteration number * @return true if match or false */ private boolean checkCondition(String condition, Contract ref, Collection<Contract> contracts, int iteration) { Binder parsed = parseCondition(condition); return checkCondition(parsed, ref, contracts, iteration); }
for (Object item: condList) { if (item.getClass().getName().endsWith("String")) result = result && checkCondition((String) item, ref, contracts, iteration); // not pre-parsed (old) version else for (Object item: condList) { if (item.getClass().getName().endsWith("String")) result = result || checkCondition((String) item, ref, contracts, iteration); // not pre-parsed (old) version else result = checkCondition(conditions, ref, contracts, iteration); else throw new IllegalArgumentException("Expected all_of or any_of");