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

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

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

A Grepper that lets all elements pass. If nothing else, this can serve to join multiple lists into one. (Yeah, I know... and I'm not even drunk.)


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.ONEGrepper()
           
 
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.ONEGrepper

public Grepper.ONEGrepper()
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.