Lines Matching defs:ai
32 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
33 assertEquals(0, ai.get());
40 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
41 ai.accumulate(2);
42 assertEquals(2, ai.get());
43 ai.accumulate(-4);
44 assertEquals(2, ai.get());
45 ai.accumulate(4);
46 assertEquals(4, ai.get());
53 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
54 ai.accumulate(2);
55 assertEquals(2, ai.get());
56 ai.reset();
57 assertEquals(0, ai.get());
64 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
65 ai.accumulate(2);
66 assertEquals(2, ai.get());
67 assertEquals(2, ai.getThenReset());
68 assertEquals(0, ai.get());
75 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
76 assertEquals("0", ai.toString());
77 ai.accumulate(1);
78 assertEquals(Long.toString(1), ai.toString());
85 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
86 assertEquals(0, ai.intValue());
87 ai.accumulate(1);
88 assertEquals(1, ai.intValue());
95 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
96 assertEquals(0, ai.longValue());
97 ai.accumulate(1);
98 assertEquals(1, ai.longValue());
105 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
106 assertEquals(0.0f, ai.floatValue());
107 ai.accumulate(1);
108 assertEquals(1.0f, ai.floatValue());
115 LongAccumulator ai = new LongAccumulator(Long::max, 0L);
116 assertEquals(0.0, ai.doubleValue());
117 ai.accumulate(1);
118 assertEquals(1.0, ai.doubleValue());