FileDocCategorySizeDatePackage
Area2DEval.javaAPI DocApache Poi 3.0.12692Sun Mar 11 12:59:28 GMT 2007org.apache.poi.hssf.record.formula.eval

Area2DEval

public class Area2DEval extends Object implements AreaEval
author
Amol S. Deshmukh < amolweb at ya hoo dot com >

Fields Summary
private AreaPtg
delegate
private ValueEval[]
values
Constructors Summary
public Area2DEval(Ptg ptg, ValueEval[] values)

        this.delegate = (AreaPtg) ptg;
        this.values = values;
    
Methods Summary
public booleancontains(int row, short col)

        return (getFirstRow() <= row) && (getLastRow() >= row) 
            && (getFirstColumn() <= col) && (getLastColumn() >= col);
    
public booleancontainsColumn(short col)

        return (getFirstColumn() <= col) && (getLastColumn() >= col);
    
public booleancontainsRow(int row)

        return (getFirstRow() <= row) && (getLastRow() >= row);
    
public shortgetFirstColumn()

        return delegate.getFirstColumn();
    
public intgetFirstRow()

        return delegate.getFirstRow();
    
public shortgetLastColumn()

        return delegate.getLastColumn();
    
public intgetLastRow()

        return delegate.getLastRow();
    
public org.apache.poi.hssf.record.formula.eval.ValueEvalgetValueAt(int row, short col)

        ValueEval retval;
        int index = ((row-getFirstRow())*(getLastColumn()-getFirstColumn()+1))+(col-getFirstColumn());
        if (index <0 || index >= values.length)
            retval = ErrorEval.VALUE_INVALID;
        else 
            retval = values[index];
        return retval;
    
public org.apache.poi.hssf.record.formula.eval.ValueEval[]getValues()

        return values;
    
public booleanisColumn()

        return delegate.getFirstColumn() == delegate.getLastColumn();
    
public booleanisRow()

        return delegate.getFirstRow() == delegate.getLastRow();