net.sf.mmm.util.filter.base
Class ConjunctionFilter<V>

java.lang.Object
  extended by net.sf.mmm.util.filter.base.ConjunctionFilter<V>
Type Parameters:
V - is the generic type of the value to check.
All Implemented Interfaces:
Filter<V>

public class ConjunctionFilter<V>
extends Object
implements Filter<V>

This is an implementation of the Filter interface that combines a given list of filters using a boolean Conjunction.

Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  Conjunction conjunction
          The boolean conjunction.
private  Filter<V>[] filterList
          the filters to check.
 
Constructor Summary
ConjunctionFilter(Conjunction conjunction, Filter<V>... filters)
          The constructor.
 
Method Summary
 boolean accept(V value)
          This method determines if the given value should be accepted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filterList

private final Filter<V>[] filterList
the filters to check.


conjunction

private final Conjunction conjunction
The boolean conjunction.

Constructor Detail

ConjunctionFilter

public ConjunctionFilter(Conjunction conjunction,
                         Filter<V>... filters)
The constructor.

Parameters:
conjunction - is the Conjunction used to combine the filters.
filters - are the filters to combine.
Method Detail

accept

public boolean accept(V value)
This method determines if the given value should be accepted.

Specified by:
accept in interface Filter<V>
Parameters:
value - is the value to check.
Returns:
true if the given value is acceptable, false if it should be filtered.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.