NodeList extends NodeFeature implements ReactiveValue { public void forEach(ForEachCallback<Object> callback) { eventRouter.registerRead(); values.forEach(callback); } NodeList(int id, StateNode node); int length(); Object get(int index); void set(int index, Object value); void add(int index, Object item); void splice(int index, int remove); void clear(); final void splice(int index, int remove, JsArray<?> add); @Override JsonValue getDebugJson(); @Override JsonValue convert(Function<Object, JsonValue> converter); EventRemover addSpliceListener(ListSpliceListener listener); @Override EventRemover addReactiveValueChangeListener(
            ReactiveValueChangeListener reactiveValueChangeListener); void forEach(ForEachCallback<Object> callback); boolean hasBeenCleared();  }
@Test public void testForEach() { list.add(0, "foo"); list.add(1, "bar"); list.add(0, "baz"); List<String> forEachList = new ArrayList<>(); list.forEach(item -> { forEachList.add((String) item); }); Assert.assertArrayEquals(new String[] { "baz", "foo", "bar" }, forEachList.toArray()); }