@Test public void fromCursorList() { MatrixCursor c = new MatrixCursor(new String[]{"title", "id"}); c.addRow(new Object[]{"title1", 1}); c.addRow(new Object[]{"title2", 2}); c.addRow(new Object[]{"title3", 3}); CursorList<TestModel> cursorList = new CursorList<TestModel>(c, TestModel.class); ModelList<TestModel> modelList = ModelList.from(cursorList); assertEquals(3, modelList.size()); assertEquals("title1", modelList.get(0).title); assertEquals("title2", modelList.get(1).title); assertEquals("title3", modelList.get(2).title); }
public static <E extends Model> ModelList<E> from(CursorList<E> cursorList) { return new ModelList<E>(cursorList.asList()); }
ModelList extends ArrayList<E> { public static <E extends Model> ModelList<E> from(CursorList<E> cursorList) { return new ModelList<E>(cursorList.asList()); } }
ModelList extends ArrayList<E> { public static <E extends Model> ModelList<E> from(CursorList<E> cursorList) { return new ModelList<E>(cursorList.asList()); } ModelList();  ModelList(int capacity);  ModelList(Collection<? extends E> collection); }
ModelList extends ArrayList<E> { public static <E extends Model> ModelList<E> from(CursorList<E> cursorList) { return new ModelList<E>(cursorList.asList()); } ModelList();  ModelList(int capacity);  ModelList(Collection<? extends E> collection); static ModelList<E> from(CursorList<E> cursorList); boolean saveAll(); boolean saveAll(Transaction t); void saveAllAsync(); void saveAllAsync(final OnAllSavedCallback callback); void deleteAll(); void deleteAll(Transaction t); void deleteAllAsync(); void deleteAllAsync(final OnAllDeletedCallback callback); }
ModelList extends ArrayList<E> { public static <E extends Model> ModelList<E> from(CursorList<E> cursorList) { return new ModelList<E>(cursorList.asList()); } ModelList();  ModelList(int capacity);  ModelList(Collection<? extends E> collection); static ModelList<E> from(CursorList<E> cursorList); boolean saveAll(); boolean saveAll(Transaction t); void saveAllAsync(); void saveAllAsync(final OnAllSavedCallback callback); void deleteAll(); void deleteAll(Transaction t); void deleteAllAsync(); void deleteAllAsync(final OnAllDeletedCallback callback);  }