@Test public void setValueBackward() { final Array<Integer> proxy = Array.of(ObjectStore.ofLength(1000)); for (int i = 0; i < proxy.length(); ++i) { proxy.set(i, 111); } for (int i = 0; i < proxy.length(); ++i) { final Integer value = proxy.get(i); Assert.assertEquals(value, Integer.valueOf(111)); } final ListIterator<Integer> it = new BaseMSeqIterator<>(proxy); while (it.hasNext()) { it.next(); } int count = 0; while (it.hasPrevious()) { it.previous(); it.set(222); ++count; } Assert.assertEquals(count, proxy.length()); for (int i = 0; i < proxy.length(); ++i) { final Integer value = proxy.get(i); Assert.assertEquals(value, Integer.valueOf(222)); } }
@Override public void set(final T value) { if (lastElement < 0) { throw new IllegalStateException(); } array.set(lastElement, value); }
BaseMSeqIterator extends BaseSeqIterator<T, BaseMSeq<T>> { @Override public void set(final T value) { if (lastElement < 0) { throw new IllegalStateException(); } array.set(lastElement, value); } }
BaseMSeqIterator extends BaseSeqIterator<T, BaseMSeq<T>> { @Override public void set(final T value) { if (lastElement < 0) { throw new IllegalStateException(); } array.set(lastElement, value); } BaseMSeqIterator(final BaseMSeq<T> seq); }
BaseMSeqIterator extends BaseSeqIterator<T, BaseMSeq<T>> { @Override public void set(final T value) { if (lastElement < 0) { throw new IllegalStateException(); } array.set(lastElement, value); } BaseMSeqIterator(final BaseMSeq<T> seq); @Override void set(final T value); }
BaseMSeqIterator extends BaseSeqIterator<T, BaseMSeq<T>> { @Override public void set(final T value) { if (lastElement < 0) { throw new IllegalStateException(); } array.set(lastElement, value); } BaseMSeqIterator(final BaseMSeq<T> seq); @Override void set(final T value);  }