Class StaticFilter<T>

java.lang.Object
net.sf.basedb.util.filter.StaticFilter<T>
All Implemented Interfaces:
Filter<T>

public class StaticFilter<T>
extends Object
implements Filter<T>
A filter implementation that either rejects or accepts all object (including null).
Version:
2.9
Author:
Nicklas
Last modified
$Date: 2008-10-21 09:20:40 +0200 (ti, 21 okt 2008) $
  • Field Summary

    Fields
    Modifier and Type Field Description
    private boolean pass  
  • Constructor Summary

    Constructors
    Constructor Description
    StaticFilter​(boolean pass)
    Create a new filter.
  • Method Summary

    Modifier and Type Method Description
    boolean evaluate​(T object)
    Evaluate if the given object should pass the filter or not.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pass

      private final boolean pass
  • Constructor Details

    • StaticFilter

      public StaticFilter​(boolean pass)
      Create a new filter.
      Parameters:
      pass - TRUE if all objects should pass, FALSE if not
  • Method Details

    • evaluate

      public boolean evaluate​(T object)
      Description copied from interface: Filter
      Evaluate if the given object should pass the filter or not.
      Specified by:
      evaluate in interface Filter<T>
      Parameters:
      object - The object to evaluate
      Returns:
      TRUE if the object passes the filter, FALSE otherwise