/** * Copyright (C) 2009-2013 FoundationDB, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.foundationdb.qp.operator; import java.util.ArrayList; import java.util.Collection; import com.foundationdb.qp.row.BindableRow; import com.foundationdb.qp.row.Row; import com.foundationdb.qp.rowtype.RowType; public final class TestOperator extends ValuesScan_Default { public TestOperator(RowsBuilder rowsBuilder) { super (bindableRows(rowsBuilder.rows()), rowsBuilder.rowType()); } public TestOperator (Collection<? extends Row> rows, RowType rowType) { super(bindableRows(rows), rowType); } private static Collection<? extends BindableRow> bindableRows(Collection<? extends Row> rows) { Collection<BindableRow> result = new ArrayList<>(); for (Row row : rows) { result.add(BindableRow.of(row)); } return result; } }