Lines Matching defs:ai
31 AtomicReference ai = new AtomicReference(one);
32 assertSame(one, ai.get());
39 AtomicReference ai = new AtomicReference();
40 assertNull(ai.get());
47 AtomicReference ai = new AtomicReference(one);
48 assertSame(one, ai.get());
49 ai.set(two);
50 assertSame(two, ai.get());
51 ai.set(m3);
52 assertSame(m3, ai.get());
59 AtomicReference ai = new AtomicReference(one);
60 assertSame(one, ai.get());
61 ai.lazySet(two);
62 assertSame(two, ai.get());
63 ai.lazySet(m3);
64 assertSame(m3, ai.get());
71 AtomicReference ai = new AtomicReference(one);
72 assertTrue(ai.compareAndSet(one, two));
73 assertTrue(ai.compareAndSet(two, m4));
74 assertSame(m4, ai.get());
75 assertFalse(ai.compareAndSet(m5, seven));
76 assertSame(m4, ai.get());
77 assertTrue(ai.compareAndSet(m4, seven));
78 assertSame(seven, ai.get());
86 final AtomicReference ai = new AtomicReference(one);
89 while (!ai.compareAndSet(two, three))
94 assertTrue(ai.compareAndSet(one, two));
97 assertSame(three, ai.get());
105 AtomicReference ai = new AtomicReference(one);
106 do {} while (!ai.weakCompareAndSet(one, two));
107 do {} while (!ai.weakCompareAndSet(two, m4));
108 assertSame(m4, ai.get());
109 do {} while (!ai.weakCompareAndSet(m4, seven));
110 assertSame(seven, ai.get());
117 AtomicReference ai = new AtomicReference(one);
118 assertSame(one, ai.getAndSet(zero));
119 assertSame(zero, ai.getAndSet(m10));
120 assertSame(m10, ai.getAndSet(one));
142 AtomicReference<Integer> ai = new AtomicReference<Integer>(one);
143 assertEquals(one.toString(), ai.toString());
144 ai.set(two);
145 assertEquals(two.toString(), ai.toString());