@Test public void set() { long seed = Randoms.seed(); final Random random = new Random(seed); final Array<Integer> impl = Array.of(ObjectStore.ofLength(1000)); for (int i = 0; i < impl.length(); ++i) { impl.set(i, random.nextInt()); } seed = Randoms.seed(); random.setSeed(seed); final ListIterator<Integer> it = new BaseMSeqIterator<>(impl); while (it.hasNext()) { it.next(); it.set(random.nextInt()); } random.setSeed(seed); for (int i = 0; i < impl.length(); ++i) { Assert.assertEquals(impl.get(i).intValue(), random.nextInt()); } }
@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);  }