Code example for Collection

Methods: toArray

0
        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;
        } 
 
        @Override 
        public String[] getColumnNames() {
            return columnNames;
        } 
 
        @Override 
        public int getCount() { 
            return mWordLists.length;
        } 
 
        @Override public double getDouble(int column) { return 0; }
        @Override public float getFloat(int column) { return 0; }