org.fuin.utils4j.filter
Class StringFilter

java.lang.Object
  extended by org.fuin.utils4j.filter.StringFilter
All Implemented Interfaces:
Filter

public class StringFilter
extends java.lang.Object
implements Filter

Defines a filter on a String.


Nested Class Summary
static class StringFilter.Operator
          Operators for compare operations.
 
Constructor Summary
StringFilter(StringFilter.Operator newOperator, java.lang.String constValue)
          Constructor with a property and an operator.
StringFilter(java.lang.String newOperator, java.lang.String 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.
 java.lang.String getConstValue()
          Returns the constant value any string is compared with.
 StringFilter.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

StringFilter

public StringFilter(java.lang.String newOperator,
                    java.lang.String constValue)
Constructor with a property and an operator.

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

StringFilter

public StringFilter(StringFilter.Operator newOperator,
                    java.lang.String 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.

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object

getOperator

public final StringFilter.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.

getConstValue

public final java.lang.String getConstValue()
Returns the constant value any string is compared with.

Returns:
String value.


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