org.vizzini.ai.logic
Class Filter

java.lang.Object
  extended by org.vizzini.util.AbstractBean
      extended by org.vizzini.ai.logic.Filter
All Implemented Interfaces:
Cloneable, IFilter

public class Filter
extends AbstractBean
implements IFilter

Provides a filter for the logic system.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson

Field Summary
static IFilter NONE
          None filter.
 
Fields inherited from class org.vizzini.util.AbstractBean
IGNORE_PROPERTIES
 
Constructor Summary
Filter()
          Construct this object.
Filter(ISentence sentence)
          Construct this object with the given parameter.
Filter(String name)
          Construct this object with the given parameter.
Filter(String name, ISentence sentence)
          Construct this object with the given parameter.
 
Method Summary
 Object clone()
          Return a clone of this instance.
 List fails(List objects)
          Return the subset of the given list of objects which fail this filter.
 boolean fails(Object object)
          Return true if the given object fails this filter.
 boolean failsAll(List objects)
          Return true if all the objects in the given list fail this filter.
 boolean failsOne(List objects)
          Return true if at least one of the objects in the given list fail this filter.
 String getName()
           
 ISentence getSentence()
           
 List passes(List objects)
          Return the subset of the given list of objects which pass this filter.
 boolean passes(Object object)
          Return true if the given object passes this filter.
 boolean passesAll(List objects)
          Return true if all the objects in the given list pass this filter.
 boolean passesOne(List objects)
          Return true if at least one of the objects in the given list pass this filter.
 void setName(String name)
           
 void setSentence(ISentence sentence)
           
 
Methods inherited from class org.vizzini.util.AbstractBean
appendArray, appendCollection, appendList, appendMap, compareBooleans, compareObjects, equals, getIgnoreProperties, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.vizzini.ai.logic.IFilter
toString
 

Field Detail

NONE

public static final IFilter NONE
None filter.

Constructor Detail

Filter

public Filter()
Construct this object.


Filter

public Filter(String name)
Construct this object with the given parameter.

Since:
v0.2

Filter

public Filter(ISentence sentence)
Construct this object with the given parameter.

Since:
v0.2

Filter

public Filter(String name,
              ISentence sentence)
Construct this object with the given parameter.

Since:
v0.2
Method Detail

clone

public Object clone()
Return a clone of this instance.

Specified by:
clone in interface IFilter
Overrides:
clone in class Object
Since:
v0.2

fails

public boolean fails(Object object)
Return true if the given object fails this filter.

Specified by:
fails in interface IFilter
Since:
v0.2

fails

public List fails(List objects)
Return the subset of the given list of objects which fail this filter.

Specified by:
fails in interface IFilter
Since:
v0.2

failsAll

public boolean failsAll(List objects)
Return true if all the objects in the given list fail this filter.

Specified by:
failsAll in interface IFilter
Since:
v0.2

failsOne

public boolean failsOne(List objects)
Return true if at least one of the objects in the given list fail this filter.

Specified by:
failsOne in interface IFilter
Since:
v0.2

getName

public String getName()
Specified by:
getName in interface IFilter
Returns:
Return name.
Since:
v0.2

getSentence

public ISentence getSentence()
Specified by:
getSentence in interface IFilter
Returns:
Return sentence.
Since:
v0.2

passes

public boolean passes(Object object)
Return true if the given object passes this filter.

Specified by:
passes in interface IFilter
Since:
v0.2

passes

public List passes(List objects)
Return the subset of the given list of objects which pass this filter.

Specified by:
passes in interface IFilter
Since:
v0.2

passesAll

public boolean passesAll(List objects)
Return true if all the objects in the given list pass this filter.

Specified by:
passesAll in interface IFilter
Since:
v0.2

passesOne

public boolean passesOne(List objects)
Return true if at least one of the objects in the given list pass this filter.

Specified by:
passesOne in interface IFilter
Since:
v0.2

setName

public void setName(String name)
Specified by:
setName in interface IFilter
Parameters:
name - The name to set.
Since:
v0.2

setSentence

public void setSentence(ISentence sentence)
Specified by:
setSentence in interface IFilter
Parameters:
sentence - The sentence to set.
Since:
v0.2


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02