app/src/main/java/com/adroitdevs/belanja/TasksModel.java
List<Task> allTasks() {
        int nDocs = this.mDatastore.getDocumentCount();
        List<DocumentRevision> all = this.mDatastore.getAllDocuments(0, nDocs, true);
        List<Task> tasks = new ArrayList<>();

        // Filter all documents down to those of type Task.
        for (DocumentRevision rev : all) {
            Task t = Task.fromRevision(rev);
            if (t != null) {
                tasks.add(t);
            }
        }

        return tasks;
    }
/**
     * Returns all {@code Task} documents in the datastore.
     *
     * @return a List<Task> object of size taskCount.
     */
Returns all  Task documents in the datastore.
@return a List object of size taskCount.
Returns all Task documents in the datastore . @return a List object of size taskCount .
List<Task> allTasks() {
        int nDocs = this.mDatastore.getDocumentCount();
        List<DocumentRevision> all = this.mDatastore.getAllDocuments(0, nDocs, true);
        List<Task> tasks = new ArrayList<>();
        for (DocumentRevision rev : all) {
            Task t = Task.fromRevision(rev);
            if (t != null) {
                tasks.add(t);
            }
        }
        return tasks;
    }
List < Task > allTasks ( ) { int nDocs = this . mDatastore . getDocumentCount ( ) ; List < DocumentRevision > all = this . mDatastore . getAllDocuments ( 0 , nDocs , true ) ; List < Task > tasks = new ArrayList < > ( ) ; for ( DocumentRevision rev : all ) { Task t = Task . fromRevision ( rev ) ; if ( t != null ) { tasks . add ( t ) ; } } return tasks ; }
Returns all {@code Task} documents in the datastore.
Returns all { @code Task } documents in the datastore .
// Filter all documents down to those of type Task.