All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.ac.starlink.table.storage.DiscardRowStore Maven / Gradle / Ivy

There is a newer version: 4.3
Show newest version
package uk.ac.starlink.table.storage;

import uk.ac.starlink.table.EmptyStarTable;
import uk.ac.starlink.table.RowStore;
import uk.ac.starlink.table.StarTable;

/**
 * Minimal implementation of RowStore which throws away the row
 * data it is given.  The table returned by {@link #getStarTable} has the
 * same metadata as the one passed in by the {@link #acceptMetadata},
 * but no rows.
 *
 * @author   Mark Taylor (Starlink)
 * @since    5 Aug 2004
 */
public class DiscardRowStore implements RowStore {

    private StarTable table_;

    public void acceptMetadata( StarTable meta ) {
        table_ = new EmptyStarTable( meta );
    }

    public void acceptRow( Object[] row ) {
    }

    public void endRows() {
    }

    public StarTable getStarTable() {
        return table_; 
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy