public Collection<?> toCollection() throws SQLException {

        TreeMap<Integer, Object> tMap = new TreeMap<>();

        for (int i = 0; i<numRows; i++) {
            tMap.put(i, rvh.get(i));
        }

        return (tMap.values());
    }
Converts this <code>CachedRowSetImpl</code> object to a collection
of tables. The sample implementation utilitizes the <code>TreeMap</code>
collection type.
This class guarantees that the map will be in ascending key order,
sorted according to the natural order for the key's class.

@return a <code>Collection</code> object consisting of tables,
        each of which is a copy of a row in this
        <code>CachedRowSetImpl</code> object
@throws SQLException if an error occurs in generating the collection
@see #toCollection(int)
@see #toCollection(String)
@see TreeMap
src/main/java/org/replicadb/rowset/sun/rowset/CachedRowSetImpl.java