Returns an {@link java.util.ArrayList} of the {@link android.database.Cursor} and closes it.
494711
public static <T> ArrayList<T> consumeToArrayList(IterableCursor<T> cursor) {
        return consumeToCollection(cursor, new ArrayList<T>(cursor.getCount()));
    }
637051
public java.util.List<Mapping> getMapping() {  
		if (myMapping == null) {
			myMapping = new java.util.ArrayList<Mapping>();
		}
		return myMapping;
	}
40508
public T get() {
		final SQLiteDatabase db = Sprinkles.getDatabase();
		final Cursor c = db.rawQuery(rawQuery, null);

		T result = null;
		if (c.moveToFirst()) {
			result = Utils.getResultFromCursor(resultClass, c);
		}

		c.close();
		return result;
	}
1155767
public List<UIContext> getRowContexts() {
		List<?> beanList = this.getBeanList();
		List<UIContext> contexts = new ArrayList<>(beanList.size());

		for (int i = 0; i < beanList.size(); i++) {
			Object rowData = beanList.get(i);
			contexts.add(this.getRowContext(rowData, i));
		}

		return Collections.unmodifiableList(contexts);
	}
969599
public java.util.List<ListenerDescription> getListenerDescriptions() {
        if (listenerDescriptions == null) {
            listenerDescriptions = new com.amazonaws.internal.SdkInternalList<ListenerDescription>();
        }
        return listenerDescriptions;
    }
409484
def get_cursor(cls):
        """"""
        db = SqliteConnection.get()
        db.row_factory = sqlite3.Row
        return db.cursor()
1193110
public ArrayList<String> getThrowsList()
    {
        ArrayList<String> throwsList = new ArrayList<String>();

        if ( _methodDecl == null ||
             _methodDecl.getThrownTypes() == null ||
             _methodDecl.getThrownTypes().size() == 0 )
            return throwsList;
        
        Collection<ReferenceType> thrownTypes = _methodDecl.getThrownTypes();
        for (ReferenceType exceptType : thrownTypes)
            throwsList.add(exceptType.toString());

        return throwsList;
    }
186616
public synchronized List<E> getAll() {
		ArrayList<E> list = new ArrayList<E>();

		for (E element : listElements) {
			if (element != null) {
				list.add(element);
			}
		}

		return list;
	}
793723
void close() throws RepositoryException {
        mLock.lock();
        if (mClosed) {
            mLock.unlock();
            return;
        }
 
        Map<Class<?>, CursorList<TransactionImpl<Txn>>> cursors;
        try {
            cursors = mCursors;        

            // Ensure that map is freed promptly. Thread-local reference to
            // this scope otherwise keeps map and its contents lingering around
            // for a very long time.
            mCursors = null;

            while (mActive != null) {
                mActive.exit();
            }
        } finally {
            // Swap TransactionManager out with a dummy one, to allow the
            // original one to get freed.
            mTxnMgr = (TransactionManager<Txn>) TransactionManager.Closed.THE;
            mClosed = true;
            mLock.unlock();
        }

        // Close cursors without lock held, to prevent deadlock. Cursor close
        // operation might acquire its own lock, which in turn acquires a lock
        // on this scope.
        if (cursors != null) {
            for (CursorList<TransactionImpl<Txn>> cursorList : cursors.values()) {
                cursorList.closeCursors();
            }
        }
    }
773917
List<? extends E> list() {
		List<E> result = new ArrayList<E>();
		while (hasNext()) {
			result.add(next());
		}
		return result;
	}
1062950
public CursorList<T> get() {
		final SQLiteDatabase db = Sprinkles.getDatabase();
		final Cursor c = db.rawQuery(rawQuery, null);
		return new CursorList<T>(c, resultClass);
	}
193069
public List<TableType> getTableTypes() throws SQLException {
        final List<TableType> list = new ArrayList<>();
        try (ResultSet results = databaseMetadata.getTableTypes()) {
            if (results != null) {
                bind(results, TableType.class, list);
            }
        }
        return list;
    }
480652
def close(self):
        
        for c in self.cursors:
            c.close()
        self.cursors = []
        self.impl = None
335811
public List<T> values() {
        List<T> result = new ArrayList<T>();
        for (Iterator<T> itr = iterator(); itr.hasNext(); ) {
            result.add(itr.next());
        }
        return result;
    }
557241
public static <T> LinkedList<T> consumeToLinkedList(IterableCursor<T> cursor) {
        return consumeToCollection(cursor, new LinkedList<T>());
    }
1093516
public Map<String, List<Cursor>> getCursorsByDocument() {
    return this.getCursors().collect(Collectors.groupingBy((Cursor x) -> x.getDocument()));
  }
1021034
static <T> List<T> toList(final Class<T> targetClass, final Cursor cursor, final int columnIndex, int offset, int count) {
        if (columnIndex < 0 || columnIndex >= cursor.getColumnCount()) {
            throw new IllegalArgumentException("Invalid column index: " + columnIndex);
        }

        if (offset > 0) {
            cursor.moveToPosition(offset - 1);
        }

        final List<T> resultList = new ArrayList<>();

        if (N.isEntity(targetClass)) {
            final Method propSetMethod = ClassUtil.getPropSetMethod(targetClass, cursor.getColumnName(columnIndex));
            final Type<T> selectColumnType = Type.valueOf(propSetMethod.getParameterTypes()[0]);

            while (count-- > 0 && cursor.moveToNext()) {
                T entity = N.newEntity(targetClass);
                ClassUtil.setPropValue(entity, propSetMethod, selectColumnType.get(cursor, columnIndex));
                resultList.add(entity);
            }

        } else {
            final Type<T> selectColumnType = Type.valueOf(targetClass);

            while (count-- > 0 && cursor.moveToNext()) {
                resultList.add(selectColumnType.get(cursor, columnIndex));
            }
        }

        return resultList;
    }