public boolean assertCheckTypes(final BiPredicate<Value, Integer> test, final Function<Integer, String> wantedType, final boolean checkOnly) {
        final int[] idx = new int[]{ 0 };
        int exceptionIdx = -1;
        Value exceptionValue = null;
        final Set<Integer> childsInError = new HashSet<>();
        for (Value v : list) {
            if (v == null || (test != null && !test.test(v, idx[0]))) {
                childsInError.add(idx[0]);
                if (exceptionIdx < 0) {
                    exceptionIdx = idx[0];
                    exceptionValue = v;
                }
            }
            idx[0]++;
        }
        if (!childsInError.isEmpty() && !checkOnly) {
            throw new FormulaException((Throwable) null, childsInError, WRONG_TYPE, wantedType == null ? "--" : wantedType.apply(exceptionIdx), exceptionValue.toUserDisplayableString(), exceptionValue.getType());
        }
        return childsInError.isEmpty();
    }
Encapsulates a list of {@link cgeo.geocaching.utils.formulas.Value}'s for handling as parameter lists in {@link Formula}
main/src/main/java/cgeo/geocaching/utils/formulas/ValueList.java