public class FailureList extends java.util.ArrayList<Failure> implements IFailureList
| Constructor and Description |
|---|
FailureList()
Initializes new instance of the FailureList class
|
FailureList(java.util.Collection<Failure> c)
Initializes new instance of the FailureList class
|
FailureList(int initialCapacity)
Initializes new instance of the FailureList class
|
| Modifier and Type | Method and Description |
|---|---|
void |
fail(Failure item)
Adds a new failure object to the list
|
void |
fail(java.lang.String key,
java.lang.String text)
Adds a new failure object to the list
|
void |
failIf(boolean condition,
java.lang.String key,
java.lang.String text)
Adds a new failure object to the list if condition is true
|
Severity |
getSeverity()
Gets the highest severity in the list of failures
|
boolean |
isEmpty()
True if the list is empty
|
void |
setSeverity(Severity value)
Sets the highest severity in the list of failures
|
public FailureList()
public FailureList(int initialCapacity)
initialCapacity - initial capacity of th listpublic FailureList(java.util.Collection<Failure> c)
c - the collection whose elements are copied to the new listpublic Severity getSeverity()
getSeverity in interface IFailureListpublic void setSeverity(Severity value)
setSeverity in interface IFailureListvalue - severitypublic boolean isEmpty()
isEmpty in interface java.util.Collection<Failure>isEmpty in interface java.util.List<Failure>isEmpty in interface IFailureListisEmpty in class java.util.ArrayList<Failure>public void fail(Failure item)
fail in interface IFailureListitem - failure objectpublic void fail(java.lang.String key,
java.lang.String text)
fail in interface IFailureListkey - key/path of the failuretext - text of the failurepublic void failIf(boolean condition,
java.lang.String key,
java.lang.String text)
failIf in interface IFailureListcondition - conditionkey - key/path of the failuretext - text of the failure