Lines Matching refs:mQueue
66 private final PointerTrackerQueue mQueue = new PointerTrackerQueue();
69 assertEquals(0, mQueue.size());
70 assertEquals("[]", mQueue.toString());
74 mQueue.add(mElement1);
75 assertEquals(1, mQueue.size());
76 assertEquals("[1]", mQueue.toString());
77 mQueue.add(mElement2);
78 assertEquals(2, mQueue.size());
79 assertEquals("[1 2]", mQueue.toString());
80 mQueue.add(mElement3);
81 assertEquals(3, mQueue.size());
82 assertEquals("[1 2 3]", mQueue.toString());
83 mQueue.add(mElement4);
84 assertEquals(4, mQueue.size());
85 assertEquals("[1 2 3 4]", mQueue.toString());
91 mQueue.add(mElement1);
92 mQueue.add(mElement2);
93 mQueue.add(mElement3);
94 mQueue.add(mElement4);
96 mQueue.remove(mElement2);
97 assertEquals(3, mQueue.size());
98 assertEquals("[1 3 4]", mQueue.toString());
99 mQueue.remove(mElement4);
100 assertEquals(2, mQueue.size());
101 assertEquals("[1 3]", mQueue.toString());
102 mQueue.remove(mElement4);
103 assertEquals(2, mQueue.size());
104 assertEquals("[1 3]", mQueue.toString());
105 mQueue.remove(mElement1);
106 assertEquals(1, mQueue.size());
107 assertEquals("[3]", mQueue.toString());
108 mQueue.remove(mElement3);
109 assertEquals(0, mQueue.size());
110 assertEquals("[]", mQueue.toString());
111 mQueue.remove(mElement1);
112 assertEquals(0, mQueue.size());
113 assertEquals("[]", mQueue.toString());
125 mQueue.add(mElement1);
126 mQueue.add(mElement2);
127 mQueue.add(mElement3);
128 mQueue.add(mElement4);
130 mQueue.remove(mElement2);
131 assertEquals(3, mQueue.size());
132 assertEquals("[1 3 4]", mQueue.toString());
133 mQueue.remove(mElement4);
134 assertEquals(2, mQueue.size());
135 assertEquals("[1 3]", mQueue.toString());
136 mQueue.add(mElement2);
137 assertEquals(3, mQueue.size());
138 assertEquals("[1 3 2]", mQueue.toString());
139 mQueue.remove(mElement4);
140 assertEquals(3, mQueue.size());
141 assertEquals("[1 3 2]", mQueue.toString());
142 mQueue.remove(mElement1);
143 assertEquals(2, mQueue.size());
144 assertEquals("[3 2]", mQueue.toString());
145 mQueue.add(mElement1);
146 assertEquals(3, mQueue.size());
147 assertEquals("[3 2 1]", mQueue.toString());
148 mQueue.remove(mElement3);
149 assertEquals(2, mQueue.size());
150 assertEquals("[2 1]", mQueue.toString());
151 mQueue.remove(mElement1);
152 assertEquals(1, mQueue.size());
153 assertEquals("[2]", mQueue.toString());
163 mQueue.add(mElement1);
164 mQueue.add(mElement2);
165 mQueue.add(mElement3);
166 mQueue.add(mElement4);
170 mQueue.releaseAllPointers(eventTime);
172 assertEquals(0, mQueue.size());
173 assertEquals("[]", mQueue.toString());
182 mQueue.add(mElement1);
183 mQueue.add(mElement2);
184 mQueue.add(mElement3);
188 mQueue.releaseAllPointersOlderThan(mElement1, eventTime);
190 assertEquals(3, mQueue.size());
191 assertEquals("[1 2 3]", mQueue.toString());
199 mQueue.add(mElement1);
200 mQueue.add(mElement2);
201 mQueue.add(mElement3);
202 mQueue.add(mElement4);
206 mQueue.releaseAllPointersOlderThan(mElement4, eventTime);
208 assertEquals(2, mQueue.size());
209 assertEquals("[2 4]", mQueue.toString());
217 mQueue.add(mElement1);
218 mQueue.add(mElement2);
219 mQueue.add(mElement3);
220 mQueue.add(mElement4);
224 mQueue.releaseAllPointersOlderThan(mElement3, eventTime);
226 assertEquals(2, mQueue.size());
227 assertEquals("[3 4]", mQueue.toString());
235 mQueue.add(mElement1);
236 mQueue.add(mElement2);
237 mQueue.add(mElement3);
238 mQueue.add(mElement4);
242 mQueue.releaseAllPointersOlderThan(mElement4, eventTime);
244 assertEquals(1, mQueue.size());
245 assertEquals("[4]", mQueue.toString());
254 mQueue.add(mElement1);
255 mQueue.add(mElement2);
256 mQueue.add(mElement3);
257 mQueue.add(mElement4);
261 mQueue.releaseAllPointersExcept(mElement3, eventTime);
263 assertEquals(1, mQueue.size());
264 assertEquals("[3]", mQueue.toString());
273 assertFalse("hasModifierKeyOlderThan empty", mQueue.hasModifierKeyOlderThan(mElement1));
275 mQueue.add(mElement1);
276 mQueue.add(mElement2);
277 mQueue.add(mElement3);
278 mQueue.add(mElement4);
280 assertFalse(mQueue.hasModifierKeyOlderThan(mElement1));
281 assertFalse(mQueue.hasModifierKeyOlderThan(mElement2));
282 assertFalse(mQueue.hasModifierKeyOlderThan(mElement3));
283 assertFalse(mQueue.hasModifierKeyOlderThan(mElement4));
286 assertFalse(mQueue.hasModifierKeyOlderThan(mElement1));
287 assertFalse(mQueue.hasModifierKeyOlderThan(mElement2));
288 assertTrue(mQueue.hasModifierKeyOlderThan(mElement3));
289 assertTrue(mQueue.hasModifierKeyOlderThan(mElement4));
292 assertEquals(4, mQueue.size());
293 assertEquals("[1 2 3 4]", mQueue.toString());
302 assertFalse(mQueue.isAnyInSlidingKeyInput());
304 mQueue.add(mElement1);
305 mQueue.add(mElement2);
306 mQueue.add(mElement3);
307 mQueue.add(mElement4);
309 assertFalse(mQueue.isAnyInSlidingKeyInput());
312 assertTrue(mQueue.isAnyInSlidingKeyInput());
315 assertEquals(4, mQueue.size());
316 assertEquals("[1 2 3 4]", mQueue.toString());