@Override public Iterator<Map.Entry<String, String>> iterator() { Map<String, String> ret = new HashMap<String, String>(); // add in reverse order so that oldest get overridden. if (!configs.isEmpty()) { for (int i = configs.size() - 1; i >= 0; i--) { ImmutableConfigMap map = configs.get(i); Iterator<Map.Entry<String, String>> iter = map.iterator(); while (iter.hasNext()) { Map.Entry<String, String> entry = iter.next(); ret.put(entry.getKey(), entry.getValue()); } } } return UnmodifiableIterator.decorate(ret.entrySet().iterator()); }
@Override public Iterator<Predicate<E>> iterator() { final ArrayList<Predicate> pCopy = new ArrayList<Predicate>(predicates); return UnmodifiableIterator.decorate(pCopy.iterator()); }
@Override public Iterator<E> iterator() { return UnmodifiableIterator.decorate(new IteratorChain(Arrays.asList(used.iterator(),unused.iterator()))); }