org.fuin.utils4j.filter
Class AndFilter

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

public class AndFilter
extends ListFilter

Defines a filter on a list of sub filters 'and's them all together.


Field Summary
static java.lang.String DEFAULT_AND_STR
          Used to create a String representation of this filter.
 
Fields inherited from class org.fuin.utils4j.filter.ListFilter
DEFAULT_CLOSE_BRACKET, DEFAULT_OPEN_BRACKET
 
Constructor Summary
AndFilter()
          Default constructor with no arguments.
AndFilter(Filter firstFilter, Filter secondFilter)
          Constructor with two terms.
 
Method Summary
 boolean complies(java.lang.Object obj)
          Checks if the argument complies with the condition of the filter.
 java.lang.String getAndStr()
          Returns the phrase representing this type of filter.
 void setAndStr(java.lang.String newAndStr)
          Set the phrase representing this type of filter A NULL argument will set the default DEFAULT_AND_STR.
 java.lang.String toString()
          
 
Methods inherited from class org.fuin.utils4j.filter.ListFilter
addFilter, getCloseBracket, getFilterList, getOpenBracket, removeFilter, setCloseBracket, setFilterList, setOpenBracket, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_AND_STR

public static final java.lang.String DEFAULT_AND_STR
Used to create a String representation of this filter.

See Also:
Constant Field Values
Constructor Detail

AndFilter

public AndFilter()
Default constructor with no arguments.


AndFilter

public AndFilter(Filter firstFilter,
                 Filter secondFilter)
Constructor with two terms.

Parameters:
firstFilter - First term to be and'ed
secondFilter - Second term to be and'ed
Method Detail

complies

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

Parameters:
obj - Object to be tested for compliance
Returns:
If object complies TRUE else FALSE is returned.

getAndStr

public final java.lang.String getAndStr()
Returns the phrase representing this type of filter.

Returns:
Name of the filter (default "and")

setAndStr

public final void setAndStr(java.lang.String newAndStr)
Set the phrase representing this type of filter A NULL argument will set the default DEFAULT_AND_STR.

Parameters:
newAndStr - Name of the filter (default "and")

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object


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