org.ow2.clif.analyze.statistics
Class TestFilterImpl

java.lang.Object
  extended by org.ow2.clif.analyze.statistics.TestFilterImpl
All Implemented Interfaces:
java.io.Serializable, TestFilter

public class TestFilterImpl
extends java.lang.Object
implements TestFilter

Filter tests according to a given name.

Author:
Bruno Dillenseger
See Also:
Serialized Form

Constructor Summary
TestFilterImpl()
          Creates a new name filter for test descriptors with a null match, which means all test names will match this new filter.
TestFilterImpl(java.lang.String prefix)
          Creates a new filter for test name with the given string.
 
Method Summary
 boolean accept(TestDescriptor desc)
          Accepts all test names matching this filter's expression attribute.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestFilterImpl

public TestFilterImpl()
Creates a new name filter for test descriptors with a null match, which means all test names will match this new filter.


TestFilterImpl

public TestFilterImpl(java.lang.String prefix)
Creates a new filter for test name with the given string.

Parameters:
prefix - the filter that test name must match. If null, all test names will match.
Method Detail

accept

public boolean accept(TestDescriptor desc)
Accepts all test names matching this filter's expression attribute.

Specified by:
accept in interface TestFilter
Parameters:
desc - the test descriptor to accept or reject.
Returns:
true if the given test's name matches the filter's expression, false otherwise.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object