// Path: rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/ResultSetMapper.java
// public interface ResultSetMapper<T> extends Function<ResultSet, T>{
// 
//     @Override
//     T apply(@Nonnull ResultSet rs) throws SQLException;
// }
// 
// Path: rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/exceptions/SQLRuntimeException.java
// public class SQLRuntimeException extends RuntimeException {
// 
//     private static final long serialVersionUID = -3879393806890615797L;
// 
//     public SQLRuntimeException(Throwable e) {
//         super(e);
//     }
// 
//     public SQLRuntimeException(String message) {
//         super(message);
//     }
// 
// }


import static org.davidmoten.rx.jdbc.Util.mapObject;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.davidmoten.rx.jdbc.ResultSetMapper;
import org.davidmoten.rx.jdbc.exceptions.SQLRuntimeException;
import com.github.davidmoten.guavamini.Preconditions;
package org.davidmoten.rx.jdbc.tuple;





/**
 * Utility methods for tuples.
 */
public final class Tuples {

    /**
     * Private constructor to prevent instantiation.
     */
    private Tuples() {
        // prevent instantiation.
    }

// Path: rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/ResultSetMapper.java
// public interface ResultSetMapper<T> extends Function<ResultSet, T>{
// 
//     @Override
//     T apply(@Nonnull ResultSet rs) throws SQLException;
// }
// 
// Path: rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/exceptions/SQLRuntimeException.java
// public class SQLRuntimeException extends RuntimeException {
// 
//     private static final long serialVersionUID = -3879393806890615797L;
// 
//     public SQLRuntimeException(Throwable e) {
//         super(e);
//     }
// 
//     public SQLRuntimeException(String message) {
//         super(message);
//     }
// 
// }


// Path: rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/tuple/Tuples.java
import static org.davidmoten.rx.jdbc.Util.mapObject;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.davidmoten.rx.jdbc.ResultSetMapper;
import org.davidmoten.rx.jdbc.exceptions.SQLRuntimeException;
import com.github.davidmoten.guavamini.Preconditions;

package org.davidmoten.rx.jdbc.tuple;





/**
 * Utility methods for tuples.
 */
public final class Tuples {

    /**
     * Private constructor to prevent instantiation.
     */
    private Tuples() {
        // prevent instantiation.
    }

    public static <T> ResultSetMapper<T> single(final Class<T> cls) {