public class TestAndIndex extends Object
Constructor and Description |
---|
TestAndIndex(NameTest testIn,
int indexIn)
Creates a new TestAndIndex.
|
TestAndIndex(String prefix,
int indexIn)
Creates a new TestAndIndex for a "starts with" test.
|
TestAndIndex(String prefix,
String content,
int indexIn)
Creates a new TestAndIndex for a "starts with and contains" test.
|
TestAndIndex(String prefix,
TestType tt,
int indexIn)
Creates a new TestAndIndex.
|
Modifier and Type | Method and Description |
---|---|
static int |
getMatch(TestAndIndex[] tests,
String name)
Checks tests for a match.
|
public TestAndIndex(NameTest testIn, int indexIn)
testIn
- the test.indexIn
- the index.public TestAndIndex(String prefix, int indexIn)
prefix
- string that the name must start with to pass the test.indexIn
- the index.public TestAndIndex(String prefix, String content, int indexIn)
prefix
- string that the name must start with to pass the test.content
- string that must appear in the name for it to pass the
test.indexIn
- the index.public static int getMatch(TestAndIndex[] tests, String name)
tests
- the tests to be run.name
- the string to be tested.tests
for
which name
passes the test, or -1 if it does not pass any of
the tests.