public void setState(final Iterable<T> coll) {
        lastState.clear();
        for (T element : coll) {
            final K key = keyMapper.apply(element);
            final V value = valueMapper == null ? null : valueMapper.apply(element, key);
            lastState.put(key, value);
        }
    }
sets state collection against which the next diff is performed
main/src/main/java/cgeo/geocaching/utils/CollectionDiff.java