Code example for BitSet

Methods: get, set

0
     * row. 
     * @param row the row to check for a valid cache entry 
     * @return true if the cache row is valid, false otherwise 
     */ 
    public boolean isCacheValid(int row) {
        return m_valid.get(row);
    } 
     
    /** 
     * Invalidate a range of the cache. 
     * @param start the start of the range to invalidate 
     * @param end the end of the range to invalidate, inclusive 
     */ 
    public void invalidateCache(int start, int end ) {
        m_valid.clear(start, end+1);
    } 
     
    // ------------------------------------------------------------------------ 
    // Data Access Methods     
 
    /** 
     * Has no effect, as all values in this column are derived. 
     * @param row the row to revert 
     */ 
    public void revertToDefault(int row) {
        // do nothing, as we don't have default values. 
    } 
     
    /** 
     * @see prefuse.data.column.AbstractColumn#canSet(java.lang.Class) 
     */ 
    public boolean canSet(Class type) {
        return false; 
    } 
     
    /** 
     * @see prefuse.data.column.Column#get(int) 
     */ 
    public Object get(int row) {
        rangeCheck(row);
        if ( isCacheValid(row) ) {
            return m_cache.get(row);
        } 
        Object val = m_expr.get(m_table.getTuple(row));
        Class type = val==null ? Object.class : val.getClass();
        if ( m_cache.canSet(type) ) {
            m_cache.set(val, row);
            m_valid.set(row);
        } 
        return val;
    } 
 
    /**