List of usage examples for java.util AbstractMap.SimpleImmutableEntry AbstractMap.SimpleImmutableEntry
public SimpleImmutableEntry(K key, V value)
From source file:sf.net.experimaestro.utils.JSUtils.java
private static Iterable<? extends Map.Entry<Object, Object>> iterable(final NativeObject object) { final Object[] ids = object.getIds(); return new Iterable<Map.Entry<Object, Object>>() { @Override//w ww. jav a 2 s . com public Iterator<Map.Entry<Object, Object>> iterator() { return new AbstractIterator<Map.Entry<Object, Object>>() { int i = 0; @Override protected Map.Entry<Object, Object> computeNext() { if (i >= ids.length) return endOfData(); final Object id = ids[i++]; String key = id.toString(); final Object value = object.get(id); return new AbstractMap.SimpleImmutableEntry<>(key, value); } }; } }; }