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 IFailureList
public void setSeverity(Severity value)
setSeverity
in interface IFailureList
value
- severitypublic boolean isEmpty()
isEmpty
in interface java.util.Collection<Failure>
isEmpty
in interface java.util.List<Failure>
isEmpty
in interface IFailureList
isEmpty
in class java.util.ArrayList<Failure>
public void fail(Failure item)
fail
in interface IFailureList
item
- failure objectpublic void fail(java.lang.String key, java.lang.String text)
fail
in interface IFailureList
key
- key/path of the failuretext
- text of the failurepublic void failIf(boolean condition, java.lang.String key, java.lang.String text)
failIf
in interface IFailureList
condition
- conditionkey
- key/path of the failuretext
- text of the failure