package prefuse.data.util; import java.util.HashSet; import prefuse.data.column.Column; /** * ColumnProjection instance that includes or excludes columns based on * the column name. * * @author jeffrey heer */ public class NamedColumnProjection extends AbstractColumnProjection { private HashSet m_names; private boolean m_include; /** * Create a new NamedColumnProjection. * @param name the name to filter on * @param include true to include the given names (and exclude all others), * false to exclude them (and include all others) */ public NamedColumnProjection(String name, boolean include) { m_names = new HashSet(); m_names.add(name); m_include = include; } /** * Create a new NamedColumnProjection. * @param names the names to filter on * @param include true to include the given names (and exclude all others), * false to exclude them (and include all others) */ public NamedColumnProjection(String[] names, boolean include) { m_names = new HashSet(); for ( int i=0; i