Lines Matching refs:mObservable
38 private ObservableList<String> mObservable;
105 mObservable = new ObservableArrayList<>();
109 mObservable.add("Hello");
111 mObservable.addOnListChangedCallback(mListener);
112 mObservable.add("World");
118 mObservable.removeOnListChangedCallback(mListener);
120 mObservable.addOnListChangedCallback(mListener);
121 mObservable.add("Hello");
123 mObservable.removeOnListChangedCallback(mListener);
124 mObservable.add("World");
128 mObservable.removeOnListChangedCallback(mListener);
156 mObservable.addOnListChangedCallback(mListener);
157 mObservable.addOnListChangedCallback(listChangedListener);
158 mObservable.add("Hello");
164 assertEquals("Hello", mObservable.get(0));
168 mObservable.addOnListChangedCallback(mListener);
169 mObservable.add("Hello");
170 mObservable.add(0, "World");
171 mObservable.add(1, "Dang");
172 mObservable.add(3, "End");
173 assertEquals(4, mObservable.size());
174 assertEquals("World", mObservable.get(0));
175 assertEquals("Dang", mObservable.get(1));
176 assertEquals("Hello", mObservable.get(2));
177 assertEquals("End", mObservable.get(3));
189 mObservable.add("First");
190 mObservable.addOnListChangedCallback(mListener);
191 mObservable.addAll(toAdd);
192 assertEquals(3, mObservable.size());
193 assertEquals("Hello", mObservable.get(1));
194 assertEquals("World", mObservable.get(2));
206 mObservable.add("First");
207 mObservable.addOnListChangedCallback(mListener);
208 mObservable.addAll(0, toAdd);
209 assertEquals(3, mObservable.size());
210 assertEquals("Hello", mObservable.get(0));
211 assertEquals("World", mObservable.get(1));
220 mObservable.add("Hello");
221 mObservable.add("World");
222 mObservable.addOnListChangedCallback(mListener);
223 mObservable.clear();
230 mObservable.clear();
236 mObservable.add("Hello");
237 mObservable.add("World");
238 mObservable.addOnListChangedCallback(mListener);
239 assertEquals("Hello", mObservable.remove(0));
248 mObservable.add("Hello");
249 mObservable.add("World");
250 mObservable.addOnListChangedCallback(mListener);
251 assertTrue(mObservable.remove("Hello"));
258 assertFalse(mObservable.remove("Hello"));
264 mObservable.add("Hello");
265 mObservable.add("World");
266 mObservable.addOnListChangedCallback(mListener);
267 assertEquals("Hello", mObservable.set(0, "Goodbye"));
268 assertEquals("Goodbye", mObservable.get(0));
269 assertEquals(2, mObservable.size());