org.ow2.clif.analyze.lib.list
Class PrefixTestFilter

java.lang.Object
  extended by org.ow2.clif.analyze.lib.list.PrefixTestFilter
All Implemented Interfaces:
java.io.Serializable, TestFilter

public class PrefixTestFilter
extends java.lang.Object
implements TestFilter

Instances of this class filter tests according to a given name prefix.

Author:
Bruno Dillenseger
See Also:
Serialized Form

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

Constructor Detail

PrefixTestFilter

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


PrefixTestFilter

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

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

accept

public boolean accept(TestDescriptor desc)
Accepts all test names matching this filter's prefix 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 prefix, false otherwise.