com.ebay.erl.mobius.core.criterion
Class NumberCriterion

java.lang.Object
  extended by com.ebay.erl.mobius.core.criterion.TupleCriterion
      extended by com.ebay.erl.mobius.core.criterion.NumberCriterion
All Implemented Interfaces:
java.io.Serializable, org.apache.hadoop.conf.Configurable

public class NumberCriterion
extends TupleCriterion

See Also:
Serialized Form

Field Summary
protected  java.lang.String columnName
           
protected  RelationalOperator op
           
protected  java.lang.Object value
           
 
Constructor Summary
NumberCriterion(java.lang.String columnName, java.lang.Double value, RelationalOperator op)
           
NumberCriterion(java.lang.String columnName, java.util.List<java.lang.Double> value, RelationalOperator op)
           
 
Method Summary
 boolean accept(Tuple tuple, org.apache.hadoop.conf.Configuration configuration)
          Test if the tuple meet this TupleCriterion or not
protected  boolean eq(Tuple tuple)
           
protected  boolean evaluate(Tuple tuple, org.apache.hadoop.conf.Configuration configuration)
          Sub class shall override this method to verify if the tuple meet the the criteria or not.
protected  boolean ge(Tuple tuple)
           
 java.lang.String[] getInvolvedColumns()
          return an array of column names that are required by this criterion.
protected  boolean gt(Tuple tuple)
           
protected  boolean le(Tuple tuple)
           
protected  boolean lt(Tuple tuple)
           
protected  boolean ne(Tuple tuple)
           
protected  boolean not_null(Tuple tuple)
           
protected  boolean not_within(Tuple tuple)
           
 java.lang.String toString()
           
protected  boolean within(Tuple tuple)
           
 
Methods inherited from class com.ebay.erl.mobius.core.criterion.TupleCriterion
and, getConf, not, or, setConf, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

columnName

protected java.lang.String columnName

value

protected java.lang.Object value

op

protected RelationalOperator op
Constructor Detail

NumberCriterion

public NumberCriterion(java.lang.String columnName,
                       java.lang.Double value,
                       RelationalOperator op)

NumberCriterion

public NumberCriterion(java.lang.String columnName,
                       java.util.List<java.lang.Double> value,
                       RelationalOperator op)
Method Detail

eq

protected boolean eq(Tuple tuple)

ne

protected boolean ne(Tuple tuple)

ge

protected boolean ge(Tuple tuple)

gt

protected boolean gt(Tuple tuple)

le

protected boolean le(Tuple tuple)

lt

protected boolean lt(Tuple tuple)

within

protected boolean within(Tuple tuple)

not_within

protected boolean not_within(Tuple tuple)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getInvolvedColumns

public java.lang.String[] getInvolvedColumns()
Description copied from class: TupleCriterion
return an array of column names that are required by this criterion.

Specified by:
getInvolvedColumns in class TupleCriterion

accept

public boolean accept(Tuple tuple,
                      org.apache.hadoop.conf.Configuration configuration)
Description copied from class: TupleCriterion
Test if the tuple meet this TupleCriterion or not

Overrides:
accept in class TupleCriterion
Parameters:
tuple - a tuple in a dataset to be tested
Returns:
true if the tuple pass this TupleCriterion, false otherwise.

evaluate

protected final boolean evaluate(Tuple tuple,
                                 org.apache.hadoop.conf.Configuration configuration)
Description copied from class: TupleCriterion
Sub class shall override this method to verify if the tuple meet the the criteria or not.

Specified by:
evaluate in class TupleCriterion
Parameters:
tuple - a tuple to be test
configuration - Hadoop configuration
Returns:
true if the tuple meets this criteria, false otherwise.

not_null

protected boolean not_null(Tuple tuple)