org.tbull.util
Class Grepper.NULLGrepper<E>

Object
  extended by org.tbull.util.Grepper.NULLGrepper<E>
All Implemented Interfaces:
Grepper<E>
Enclosing interface:
Grepper<E>

public static class Grepper.NULLGrepper<E>
extends Object
implements Grepper<E>

A Grepper that rejects all elements, producing an empty result list. I have no idea what this could be good for, but I'm faithful somebody will come up with a compelling use case.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.tbull.util.Grepper
Grepper.ANDGrepper<E>, Grepper.InverseGrepper<E>, Grepper.NULLGrepper<E>, Grepper.ONEGrepper<E>, Grepper.ORGrepper<E>, Grepper.RegexGrepper
 
Constructor Summary
Grepper.NULLGrepper()
           
 
Method Summary
 boolean grep(E element)
          Decides if the element in question should be part of the results of a grep process.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grepper.NULLGrepper

public Grepper.NULLGrepper()
Method Detail

grep

public boolean grep(E element)
Description copied from interface: Grepper
Decides if the element in question should be part of the results of a grep process.

Specified by:
grep in interface Grepper<E>
Parameters:
element - The element under test.
Returns:
true if the element matches the grep condition, thus should be added to the results, otherwise false.