com.hp.hpl.jena.util.iterator
Class Filter<T>

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.Filter<T>
Direct Known Subclasses:
OntTools.PredicatesFilter, TripleMatchFilter

public abstract class Filter<T>
extends java.lang.Object

boolean functions wrapped to be used in filtering iterators.

Author:
jjc, kers

Field Summary
static Filter any
          Deprecated. use Filter.any()
 
Constructor Summary
Filter()
           
 
Method Summary
abstract  boolean accept(T o)
          Answer true iff the object o is acceptable.
 Filter<T> and(Filter<T> other)
           
static
<T> Filter<T>
any()
           
 ExtendedIterator<T> filterKeep(java.util.Iterator<T> it)
           
 boolean isAny()
          Answer true iff this filter will deliver true for any argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

any

@Deprecated
public static final Filter any
Deprecated. use Filter.any()
A Filter that accepts everything it's offered.

Constructor Detail

Filter

public Filter()
Method Detail

accept

public abstract boolean accept(T o)
Answer true iff the object o is acceptable. This method may also throw an exception if the argument is of a wrong type; it is not required to return false in such a case.


filterKeep

public ExtendedIterator<T> filterKeep(java.util.Iterator<T> it)

and

public Filter<T> and(Filter<T> other)

isAny

public boolean isAny()
Answer true iff this filter will deliver true for any argument. Should never be overridden except by classes generated by any() below.


any

public static <T> Filter<T> any()


Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP