org.fuin.utils4j.filter
Class OrFilter

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

public class OrFilter
extends ListFilter

Defines a filter on a list of sub filters all OR'ed together.


Field Summary
static java.lang.String DEFAULT_OR_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
OrFilter()
          Default constructor with no arguments.
OrFilter(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 getOrStr()
          Returns the phrase representing this type of filter.
 void setOrStr(java.lang.String newOrStr)
          Set the phrase representing this type of filter A NULL argument will set the default DEFAULT_OR_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_OR_STR

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

See Also:
Constant Field Values
Constructor Detail

OrFilter

public OrFilter()
Default constructor with no arguments.


OrFilter

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

Parameters:
firstFilter - First term to be or'ed
secondFilter - Second term to be or'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.

toString

public final java.lang.String toString()

Overrides:
toString in class java.lang.Object

getOrStr

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

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

setOrStr

public final void setOrStr(java.lang.String newOrStr)
Set the phrase representing this type of filter A NULL argument will set the default DEFAULT_OR_STR.

Parameters:
newOrStr - Name of the filter (default "or")


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