org.fuin.utils4j.filter
Class ComparableFilter

java.lang.Object
  extended by org.fuin.utils4j.filter.ComparableFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
IntegerFilter

public abstract class ComparableFilter
extends java.lang.Object
implements Filter

Defines a filter on a Comparable value.


Nested Class Summary
static class ComparableFilter.Operator
          Operators for compare operations.
 
Constructor Summary
ComparableFilter(ComparableFilter.Operator newOperator, java.lang.Comparable constValue)
          Constructor with a property and an operator.
 
Method Summary
 boolean complies(java.lang.Object value)
          Checks if the argument complies with the condition of the filter.
protected  java.lang.Comparable getConstValueIntern()
          Returns the constant value any string is compared with.
 ComparableFilter.Operator getOperator()
          Returns the operator for compare operations.
 java.lang.String getOperatorName()
          Returns the operator for compare operations.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComparableFilter

public ComparableFilter(ComparableFilter.Operator newOperator,
                        java.lang.Comparable constValue)
Constructor with a property and an operator.

Parameters:
newOperator - Operator to use.
constValue - Value to compare with.
Method Detail

complies

public final boolean complies(java.lang.Object value)
Checks if the argument complies with the condition of the filter.

Specified by:
complies in interface Filter
Parameters:
value - Object to be tested for compliance
Returns:
If object complies TRUE else FALSE is returned.

getOperator

public final ComparableFilter.Operator getOperator()
Returns the operator for compare operations.

Returns:
Operator.

getOperatorName

public final java.lang.String getOperatorName()
Returns the operator for compare operations.

Returns:
Operator.

getConstValueIntern

protected final java.lang.Comparable getConstValueIntern()
Returns the constant value any string is compared with.

Returns:
String value.

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.