Class GroovyClosureFilter<T>

  • All Implemented Interfaces:

    public final class GroovyClosureFilter<T>
    extends Object
    implements IFilter<T>
    This class implements the IFilter interface as a Groovy closure.
    • Constructor Detail

      • GroovyClosureFilter

        public GroovyClosureFilter​(groovy.lang.Closure<?> p_closure)
        Create a filter with the given closure.

        Note that this class does not clone the given closure. So the caller is responsible to clone it, if necessary.

        p_closure - The closure used as a filter.
    • Method Detail

      • accept

        public boolean accept​(T p_obj)
        Specified by:
        accept in interface IFilter<T>
        p_obj - The object to be filtered.
        true if this filter accepts the given object, or false otherwise.