/** * gets the requested values from the Has step. If it's a single value, wrap it in an array, * otherwise return the array */ private Optional<Pair<String, Iterator<Object>>> getValuePair(HasContainer c) { Iterator<Object> values; if (c.getPredicate().getBiPredicate() == Contains.within) values = ((Iterable<Object>) c.getValue()).iterator(); else values = IteratorUtils.of(c.getValue()); return Optional.of(new Pair<>(c.getKey(), values)); }