@Test void testSet() { AtomicBiInteger abi = new AtomicBiInteger(); assertEquals(0, abi.getHi()); assertEquals(0, abi.getLo()); abi.getAndSetHi(Integer.MAX_VALUE); assertEquals(Integer.MAX_VALUE, abi.getHi()); assertEquals(0, abi.getLo()); abi.getAndSetLo(Integer.MIN_VALUE); assertEquals(Integer.MAX_VALUE, abi.getHi()); assertEquals(Integer.MIN_VALUE, abi.getLo()); }
public void set(int hi, int lo) { set(encode(hi, lo)); }
AtomicBiInteger extends AtomicLong { public void set(int hi, int lo) { set(encode(hi, lo)); } }
AtomicBiInteger extends AtomicLong { public void set(int hi, int lo) { set(encode(hi, lo)); } AtomicBiInteger();  AtomicBiInteger(long encoded);  AtomicBiInteger(int hi, int lo); }
AtomicBiInteger extends AtomicLong { public void set(int hi, int lo) { set(encode(hi, lo)); } AtomicBiInteger();  AtomicBiInteger(long encoded);  AtomicBiInteger(int hi, int lo); int getHi(); int getLo(); int getAndSetHi(int hi); int getAndSetLo(int lo); void set(int hi, int lo); boolean compareAndSetHi(int expectHi, int hi); boolean compareAndSetLo(int expectLo, int lo); boolean compareAndSet(long encoded, int hi, int lo); boolean compareAndSet(int expectHi, int hi, int expectLo, int lo); int addAndGetHi(int delta); int addAndGetLo(int delta); void add(int deltaHi, int deltaLo); static int getHi(long encoded); static int getLo(long encoded); static long encode(int hi, int lo); static long encodeHi(long encoded, int hi); static long encodeLo(long encoded, int lo); }
AtomicBiInteger extends AtomicLong { public void set(int hi, int lo) { set(encode(hi, lo)); } AtomicBiInteger();  AtomicBiInteger(long encoded);  AtomicBiInteger(int hi, int lo); int getHi(); int getLo(); int getAndSetHi(int hi); int getAndSetLo(int lo); void set(int hi, int lo); boolean compareAndSetHi(int expectHi, int hi); boolean compareAndSetLo(int expectLo, int lo); boolean compareAndSet(long encoded, int hi, int lo); boolean compareAndSet(int expectHi, int hi, int expectLo, int lo); int addAndGetHi(int delta); int addAndGetLo(int delta); void add(int deltaHi, int deltaLo); static int getHi(long encoded); static int getLo(long encoded); static long encode(int hi, int lo); static long encodeHi(long encoded, int hi); static long encodeLo(long encoded, int lo);  }