com.google.visualization.datasource.query
Class ComparisonFilter
java.lang.Object
com.google.visualization.datasource.query.QueryFilter
com.google.visualization.datasource.query.ComparisonFilter
- Direct Known Subclasses:
- ColumnColumnFilter, ColumnValueFilter
public abstract class ComparisonFilter
- extends QueryFilter
A filter that decides upon a row by comparing two values. The values can be
either column values or constant values, depending on the concrete class
extending this one.
- Author:
- Yonatan B.Y.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
operator
protected ComparisonFilter.Operator operator
- The comparison operator for this filter.
ComparisonFilter
protected ComparisonFilter(ComparisonFilter.Operator operator)
- Constructs a new ComparisonFilter with the given operator.
- Parameters:
operator - The comparison operator for this filter.
isOperatorMatch
protected boolean isOperatorMatch(Value v1,
Value v2)
- Matches the given two values against the operator. E.g., if the operator is
GT, returns true if v1 > v2. This implementation uses the
compareTo() method.
- Parameters:
v1 - The first value.v2 - The second value.
- Returns:
- true if v1 op v2, false otherwise.
getOperator
public ComparisonFilter.Operator getOperator()
- Returns the operator associated with this CompoundFilter.
- Returns:
- The operator associated with this CompoundFilter.
hashCode
public abstract int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public abstract boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
Copyright © 2009 Google. All Rights Reserved.