Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.filter
Class AndTableFilter

java.lang.Object
  extended by com.citra.filter.TableFilter
      extended by com.citra.filter.CompositeFilter
          extended by com.citra.filter.AndTableFilter
All Implemented Interfaces:
Serializable

public class AndTableFilter
extends CompositeFilter

A TableFilter that implements the logical AND operator on individual TableFilters.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.citra.filter.CompositeFilter
tableFilters
 
Fields inherited from class com.citra.filter.TableFilter
ALL_COLUMNS, column, filter
 
Constructor Summary
AndTableFilter(TableFilter[] tableFilters)
          Constructs an AndTableFilter with an array of TableFilters.
AndTableFilter(TableFilter filter1, TableFilter filter2)
          Constructs an AndTableFilter with two TableFilters.
 
Method Summary
 boolean filter(ListTableModel model, Object row)
          The AND operation.
 boolean filter(TableModel model, int rowIndex)
          The AND operation.
 
Methods inherited from class com.citra.filter.CompositeFilter
getTableFilters, setColumn
 
Methods inherited from class com.citra.filter.TableFilter
getColumn, getFilter, setFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AndTableFilter

public AndTableFilter(TableFilter[] tableFilters)
Constructs an AndTableFilter with an array of TableFilters.


AndTableFilter

public AndTableFilter(TableFilter filter1,
                      TableFilter filter2)
Constructs an AndTableFilter with two TableFilters.

Method Detail

filter

public boolean filter(ListTableModel model,
                      Object row)
The AND operation. The TableFilters specified in the constructor are applied to the given row and the AND operation is applied to their results.

Overrides:
filter in class TableFilter
Parameters:
model - the ListTableModel that holds a reference to the tabular row data
row - the row of the table to filter, represented as an object
Returns:
true if the AND succeeds, false otherwise.

filter

public boolean filter(TableModel model,
                      int rowIndex)
The AND operation. The TableFilters specified in the constructor are applied to the given row and the AND operation is applied to their results.

Overrides:
filter in class TableFilter
Parameters:
model - the TableModel that holds the unfiltered row data
rowIndex - the index of the row of the table to filter
Returns:
true if the AND succeeds, false otherwise.

Copyright © 2011 Citra Technologies. All Rights Reserved.