public class KnownFailuresList
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
KnownFailuresList.Entry
An entry in the exclude list.
|
static class |
KnownFailuresList.Fault
This exception is used to report problems manipulating an exclude list.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KFL_FILE_VERSION |
static java.lang.String |
KFLFILE_EXTN
The standard extension for KFL files.
|
Constructor and Description |
---|
KnownFailuresList()
Create a new, empty KFL object.
|
KnownFailuresList(java.io.File f)
Create an KnownFailuresList from the data contained in a file.
|
KnownFailuresList(java.io.File[] files)
Create a KnownFailuresList from the data contained in a series of files.
|
KnownFailuresList(java.io.File[] files,
boolean strict)
Create a KnownFailuresList from the data contained in a series of files.
|
KnownFailuresList(java.io.File f,
boolean strict)
Create an KnownFailuresList from the data contained in a file.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(KnownFailuresList.Entry e) |
boolean |
equals(java.lang.Object obj) |
KnownFailuresList.Entry[] |
find(java.lang.String url) |
KnownFailuresList.Entry |
find(java.lang.String url,
java.lang.String tc) |
java.util.Iterator<KnownFailuresList.Entry> |
getIterator(boolean group)
Iterate over the contents of the table.
|
java.lang.String |
getTitle()
Get the title for this exclude list.
|
int |
hashCode() |
boolean |
isEmpty()
Check whether an exclude list has any entries or not.
|
static boolean |
isKflFile(java.io.File f)
Test if a file appears to be for an exclude list, by checking the extension.
|
boolean |
isStrictModeEnabled()
Check whether strict mode is enabled or not.
|
boolean |
listsAllOf(java.lang.String url)
Test if a specific test is completely excluded according to the table.
|
boolean |
listsAllOf(TestDescription td)
Test if a specific test is completely excluded according to the table.
|
boolean |
listsAnyOf(java.lang.String url)
Test if a specific test is partially or completely excluded according to the table.
|
boolean |
listsAnyOf(TestDescription td)
Test if a specific test is partially or completely excluded according to the table.
|
void |
merge(KnownFailuresList other)
Merge the contents of another exclude list into this one.
|
void |
setStrictModeEnabled(boolean on)
Specify whether strict mode is on or not.
|
void |
setTitle(java.lang.String title)
Set the title for this exclude list.
|
int |
size()
Get the number of entries in the table.
|
void |
write(java.io.File f)
Write the table out to a file.
|
public static final java.lang.String KFLFILE_EXTN
public static final java.lang.String KFL_FILE_VERSION
public KnownFailuresList()
public KnownFailuresList(java.io.File f) throws java.io.FileNotFoundException, java.io.IOException, KnownFailuresList.Fault
f
- The file to be read.java.io.FileNotFoundException
- if the file cannot be foundjava.io.IOException
- if any problems occur while reading the fileKnownFailuresList.Fault
- if the data in the file is inconsistentKnownFailuresList(File[])
public KnownFailuresList(java.io.File f, boolean strict) throws java.io.FileNotFoundException, java.io.IOException, KnownFailuresList.Fault
f
- The file to be read.strict
- Indicate if strict data checking rules should be used.java.io.FileNotFoundException
- if the file cannot be foundjava.io.IOException
- if any problems occur while reading the fileKnownFailuresList.Fault
- if the data in the file is inconsistentKnownFailuresList(File[])
,
setStrictModeEnabled(boolean)
public KnownFailuresList(java.io.File[] files) throws java.io.FileNotFoundException, java.io.IOException, KnownFailuresList.Fault
files
- The file to be read.java.io.FileNotFoundException
- if any of the files cannot be foundjava.io.IOException
- if any problems occur while reading the files.KnownFailuresList.Fault
- if the data in the files is inconsistentKnownFailuresList(File)
public KnownFailuresList(java.io.File[] files, boolean strict) throws java.io.FileNotFoundException, java.io.IOException, KnownFailuresList.Fault
files
- The file to be read.strict
- Indicate if strict data checking rules should be used.java.io.FileNotFoundException
- if any of the files cannot be foundjava.io.IOException
- if any problems occur while reading the files.KnownFailuresList.Fault
- if the data in the files is inconsistentKnownFailuresList(File)
,
setStrictModeEnabled(boolean)
public void addEntry(KnownFailuresList.Entry e) throws KnownFailuresList.Fault
KnownFailuresList.Fault
public static boolean isKflFile(java.io.File f)
f
- The file to be tested.true
public void setStrictModeEnabled(boolean on)
on
- true if strict mode should be enabled, and false otherwiseisStrictModeEnabled()
public boolean isStrictModeEnabled()
setStrictModeEnabled(boolean)
public java.util.Iterator<KnownFailuresList.Entry> getIterator(boolean group)
group
- if true
, entries for the same relative
URL are grouped together, and if more than one, returned in an
array; if false
, the iterator always returns
separate entries.group
parameter.KnownFailuresList.Entry
public void merge(KnownFailuresList other)
other
- the exclude list to be merged with this one.public KnownFailuresList.Entry[] find(java.lang.String url)
public KnownFailuresList.Entry find(java.lang.String url, java.lang.String tc)
public boolean listsAllOf(TestDescription td)
td
- A test description for the test being checked.true
if the table contains an entry for this test.public boolean listsAllOf(java.lang.String url)
url
- The test-suite root-relative URL for the test.true
if the table contains an entry for this test.public boolean listsAnyOf(TestDescription td)
td
- A test description for the test being checked.true
if the table contains an entry for this test.public boolean listsAnyOf(java.lang.String url)
url
- The test-suite root-relative URL for the test.true
if the table contains an entry for this test.public boolean isEmpty()
size()
public int size()
isEmpty()
public java.lang.String getTitle()
setTitle(java.lang.String)
public void setTitle(java.lang.String title)
title
- the title for this exclude listgetTitle()
public void write(java.io.File f) throws java.io.IOException
f
- The file to which the table should be written.java.io.IOException
- is thrown if any problems occur while the
file is being written.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- - object to comparepublic int hashCode()
hashCode
in class java.lang.Object
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.