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

prefuse.data.util.NamedColumnProjection Maven / Gradle / Ivy

Go to download

Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language.

The newest version!
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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy