Code example for Collection

Methods: toArray

        public ResourcePathCursor(final Collection<WordListInfo> wordLists) {
            // Allocating a 0-size WordListInfo here allows the toArray() method 
            // to ensure we have a strongly-typed array. It's thrown out. That's 
            // what the documentation of #toArray says to do in order to get a 
            // new strongly typed array of the correct size. 
            mWordLists = wordLists.toArray(new WordListInfo[0]);
            mPos = 0;
        public String[] getColumnNames() {
            return columnNames;
        public int getCount() { 
            return mWordLists.length;
        @Override public double getDouble(int column) { return 0; }