@Test public void loop() throws NoSuchFieldException, IllegalAccessException { TransactionIDIterator iterator = new TransactionIDIterator(); Field current = TransactionIDIterator.class.getDeclaredField("current"); current.setAccessible(true); current.set(iterator, 0xFFFF_FFFEL); assertThat(iterator.next().longValue(), is(0xFFFF_FFFEL)); assertThat(iterator.next().longValue(), is(1L)); }
@Override public UINT32 next() { if (0xFFFF_FFFFL <= current) { current = 1; } return new UINT32(current++); }
TransactionIDIterator implements Iterator<UINT32> { @Override public UINT32 next() { if (0xFFFF_FFFFL <= current) { current = 1; } return new UINT32(current++); } }
TransactionIDIterator implements Iterator<UINT32> { @Override public UINT32 next() { if (0xFFFF_FFFFL <= current) { current = 1; } return new UINT32(current++); }  }
TransactionIDIterator implements Iterator<UINT32> { @Override public UINT32 next() { if (0xFFFF_FFFFL <= current) { current = 1; } return new UINT32(current++); }  @Override boolean hasNext(); @Override UINT32 next(); @Override void remove(); }
TransactionIDIterator implements Iterator<UINT32> { @Override public UINT32 next() { if (0xFFFF_FFFFL <= current) { current = 1; } return new UINT32(current++); }  @Override boolean hasNext(); @Override UINT32 next(); @Override void remove();  }