org.fuin.utils4j.filter
Class TokenFilter

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

public class TokenFilter
extends java.lang.Object
implements Filter

Defines a filter on a token.


Constructor Summary
TokenFilter(java.lang.String constValue, java.lang.String newSeparators)
          Constructor with a constant value and separators.
 
Method Summary
 boolean complies(java.lang.Object value)
          Checks if the argument complies with the condition of the filter.
protected  boolean complies(java.lang.String value, java.lang.String constValue, java.lang.String separators)
          Helper method for subclasses to do the comparation.
 java.lang.String getConstValue()
          Returns the constant value any string is compared with.
 java.lang.String getSeparators()
          Returns a string with one or more separators.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TokenFilter

public TokenFilter(java.lang.String constValue,
                   java.lang.String newSeparators)
Constructor with a constant value and separators.

Parameters:
constValue - Value to compare with.
newSeparators - Separators
Method Detail

getSeparators

public final java.lang.String getSeparators()
Returns a string with one or more separators.

Returns:
Separators.

getConstValue

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

Returns:
String value.

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.

complies

protected final boolean complies(java.lang.String value,
                                 java.lang.String constValue,
                                 java.lang.String separators)
Helper method for subclasses to do the comparation.

Parameters:
value - Object that contains the property.
constValue - Value to compare with.
separators - Separators
Returns:
If object property contains the value as one of the tokens TRUE else FALSE.

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object


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