|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.xml.check.Check
public abstract class Check
The Check
class is the base class for all check operations. It also defines,
for use by external classes, all of the check operations that are supported.
Field Summary | |
---|---|
static java.lang.String |
BLANK_STRING
String that represents a zero length Java string |
static java.lang.String |
CHECK_TYPE_AFTER
The actual date must be after (in time) the expected date. |
static java.lang.String |
CHECK_TYPE_ALWAYS_FALSE
A check that unconditionally evaluates to false. |
static java.lang.String |
CHECK_TYPE_ALWAYS_TRUE
A check that unconditionally evaluates to true. |
static java.lang.String |
CHECK_TYPE_BEFORE
The actual date must be before (in time) the expected date. |
static java.lang.String |
CHECK_TYPE_BETWEEN
The actual date must be between the expected date range. |
static java.lang.String |
CHECK_TYPE_CONTAINS
The actual value must be a superset of the expected value. |
static java.lang.String |
CHECK_TYPE_CONTAINS_SUBSTRING
At least one actual value must contain a substring that matches at least one expected value |
static java.lang.String |
CHECK_TYPE_DOES_NOT_CONTAIN
At least one element in the expected value set is NOT contained in the actual value set. |
static java.lang.String |
CHECK_TYPE_DOES_NOT_CONTAIN_SUBSTRING
Each actual value must not contain a substring that matches any expected value |
static java.lang.String |
CHECK_TYPE_DOES_NOT_END_WITH
Each actual value must not end with any expected value |
static java.lang.String |
CHECK_TYPE_DOES_NOT_EQUAL
The actual value must not equal the expected value. |
static java.lang.String |
CHECK_TYPE_DOES_NOT_EXCLUDE
The value set must contain at least one value in the expected value set. |
static java.lang.String |
CHECK_TYPE_DOES_NOT_EXIST
The actual value must NOT exist; it must be empty |
static java.lang.String |
CHECK_TYPE_DOES_NOT_START_WITH
Each actual value must not start with any expected value |
static java.lang.String |
CHECK_TYPE_ENDS_WITH
Each actual value must end with at least one expected value |
static java.lang.String |
CHECK_TYPE_EQUALS
The actual value must equal the expected value. |
static java.lang.String |
CHECK_TYPE_EXCLUDES
The actual value must NOT contain any expected value. |
static java.lang.String |
CHECK_TYPE_EXISTS
The actual value must exist and not be empty |
static java.lang.String |
CHECK_TYPE_GREATER_THAN
The actual value must be greater than the expected value range. |
static java.lang.String |
CHECK_TYPE_IN
The actual value must be a sub set of the expected value. |
static java.lang.String |
CHECK_TYPE_IN_RANGE
The actual value must be within the expected value range, including boundary. |
static java.lang.String |
CHECK_TYPE_LESS_THAN
The actual value must be less than the expected value range. |
static java.lang.String |
CHECK_TYPE_NOT_BETWEEN
The actual date must NOT be between the expected date range. |
static java.lang.String |
CHECK_TYPE_NOT_IN
The actual value must have no intersection with the expected value. |
static java.lang.String |
CHECK_TYPE_NOT_IN_RANGE
The actual value must NOT be within the expected value range, including boundary. |
static java.lang.String |
CHECK_TYPE_REPORT_ONLY
Report the actual value in the report. |
static java.lang.String |
CHECK_TYPE_STARTS_WITH
Each actual value must start with at least one expected value |
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
static java.lang.String |
NULL_STRING
String that represents a null Java string |
Method Summary | |
---|---|
abstract boolean |
apply(java.lang.Object actualValue)
Compares the expected and actual values based on the check type. |
java.lang.String |
formattedExpectedValue()
Retrieves a formatted description of the expected value. |
static java.lang.String |
formatValue(java.lang.Object valueToFormat)
Takes any value and formats into a nicely displayable way. |
abstract java.lang.String |
getCheckName()
Retrieves a descriptive name of the check operation |
java.lang.Object |
getExpectedValue()
Retrieves the expected value associated with this check |
java.lang.String |
getFormattedDescription(java.lang.Object actualValue)
Retrieves a formatted description of the entire check operation. |
abstract java.lang.String |
getOkDescription()
Gets a description of the check result when the expected and actual values matched. |
abstract java.lang.String |
getProblemDescription()
Gets a description of the check result when the expected and actual values did not match. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String BLANK_STRING
public static final java.lang.String NULL_STRING
null
Java string
public static final java.lang.String CHECK_TYPE_EXISTS
Applies to: String, Number, Date
public static final java.lang.String CHECK_TYPE_DOES_NOT_EXIST
Applies to: String, Number, Date
public static final java.lang.String CHECK_TYPE_EQUALS
Applies to: String, Number, Date
Examples:
equals
mystring is trueequals
12345 is trueequals
somestring is falseequals
54321 is false
public static final java.lang.String CHECK_TYPE_DOES_NOT_EQUAL
Applies to: String, Number, Date
Examples:
doesNotEqual
mystring is falsedoesNotEqual
12345 is falsedoesNotEqual
somestring is truedoesNotEqual
54321 is true
public static final java.lang.String CHECK_TYPE_IN
The intersection of the actual value set and the expected value set must equal the actual value set.
Applies to: String, Number
Examples:
in
mystring is truein
['mystring' 'somestring' 'thirdstring'] is truein
somestring is falsein
['22' '33' '44' '55'] is false
public static final java.lang.String CHECK_TYPE_NOT_IN
The intersection of the actual value set and expected value set must be an empty set.
Applies to: String, Number
Examples:
notIn
mystring is falsenotIn
['mystring' 'somestring' 'thirdstring'] is falsenotIn
somestring is truenotIn
['22' '33' '44' '55'] is true
public static final java.lang.String CHECK_TYPE_CONTAINS
The intersection of the actual value set and the expected value set must equal the expected value set.
Applies to: String, Number
Examples:
contains
mystring is truecontains
['mystring' 'somestring' 'thirdstring'] is falsecontains
mystring is truecontains
['22' '33' '44' '55'] is falsecontains
33 is true
public static final java.lang.String CHECK_TYPE_DOES_NOT_CONTAIN
Applies to: String, Number
Examples:
doesNotContain
mystring is falsedoesNotContain
['mystring' 'somestring' 'thirdstring'] is truedoesNotContain
mystring is falsedoesNotContain
['22' '33'] is truedoesNotContain
['22' '55'] is truedoesNotContain
55 is falsedoesNotContain
['33' '44'] is truedoesNotContain
33 is falsedoesNotContain
['22' '33'] is false
public static final java.lang.String CHECK_TYPE_EXCLUDES
The intersection of the actual value set and the expected value set must be an empty set.
Applies to: String, Number
Examples:
exclude
mystring is falseexclude
['mystring' 'somestring' 'thirdstring'] is falseexclude
mystring is falseexclude
['22' '33' '44' '55'] is trueexclude
33 is false
public static final java.lang.String CHECK_TYPE_DOES_NOT_EXCLUDE
The intersection of the two set must NOT be empty.
Applies to: String, Number
Examples:
doesNotExclude
mystring is truedoesNotExclude
['mystring' 'somestring' 'thirdstring'] is truedoesNotExclude
mystring is truedoesNotExclude
['mystring2' 'somestring2'] is falsedoesNotExclude
['22' '33' '44' '55'] is falsedoesNotExclude
33 is true
public static final java.lang.String CHECK_TYPE_STARTS_WITH
Applies to: String
Examples:
startsWith
mystr is truestartsWith
foo is falsestartsWith
my is truestartsWith
my is false
public static final java.lang.String CHECK_TYPE_DOES_NOT_START_WITH
Applies to: String
Examples:
doesNotStartWith
mystr is falsedoesNotStartWith
foo is truedoesNotStartWith
my is falsedoesNotStartWith
my is true
public static final java.lang.String CHECK_TYPE_ENDS_WITH
Applies to: String
Examples:
endsWith
string is trueendsWith
mystr is falseendsWith
string is trueendsWith
str is false
public static final java.lang.String CHECK_TYPE_DOES_NOT_END_WITH
Applies to: String
Examples:
doesNotEndWith
string is falsedoesNotEndWith
mystr is truedoesNotEndWith
string is falsedoesNotEndWith
str is true
public static final java.lang.String CHECK_TYPE_CONTAINS_SUBSTRING
Applies to: String
Examples:
containsSubstring
str is truecontainsSubstring
thestr is falsecontainsSubstring
low is truecontainsSubstring
str is truecontainsSubstring
my is falsecontainsSubstring
['my' 'some' 'dstr'] is truecontainsSubstring
mystr is true
public static final java.lang.String CHECK_TYPE_DOES_NOT_CONTAIN_SUBSTRING
Applies to: String
Examples:
doesNotContainSubstring
str is falsedoesNotContainSubstring
thestr is truedoesNotContainSubstring
low is falsedoesNotContainSubstring
str is falsedoesNotContainSubstring
my is truedoesNotContainSubstring
['my' 'some' 'dstr'] is false
public static final java.lang.String CHECK_TYPE_IN_RANGE
Applies to: Number
Examples:
inRange
1-9 is trueinRange
1-8 is trueinRange
1-7 is falseinRange
1-7 is trueinRange
1-7 is false
public static final java.lang.String CHECK_TYPE_NOT_IN_RANGE
Applies to: Number
Examples:
notInRange
1-15 is truenotInRange
1-17 is truenotInRange
1-18 is falsenotInRange
12-27 is truenotInRange
12-27 is false
public static final java.lang.String CHECK_TYPE_LESS_THAN
Applies to: Number
Examples:
lessThan
20 is truelessThan
15 is false
public static final java.lang.String CHECK_TYPE_GREATER_THAN
Applies to: Number
Examples:
greaterThan
30 is truegreaterThan
55 is false
public static final java.lang.String CHECK_TYPE_BETWEEN
Applies to: Date
public static final java.lang.String CHECK_TYPE_NOT_BETWEEN
Applies to: Date
public static final java.lang.String CHECK_TYPE_BEFORE
Applies to: Date
public static final java.lang.String CHECK_TYPE_AFTER
Applies to: Date
public static final java.lang.String CHECK_TYPE_REPORT_ONLY
public static final java.lang.String CHECK_TYPE_ALWAYS_TRUE
public static final java.lang.String CHECK_TYPE_ALWAYS_FALSE
Method Detail |
---|
public java.lang.Object getExpectedValue()
public abstract boolean apply(java.lang.Object actualValue)
actualValue
- The actual value, which is compared to the expected value
true
if the expected and actual values match when compared using
the rules associated with the check type.public abstract java.lang.String getOkDescription()
public abstract java.lang.String getProblemDescription()
public abstract java.lang.String getCheckName()
public java.lang.String getFormattedDescription(java.lang.Object actualValue)
actualValue
- The actual value
public java.lang.String formattedExpectedValue()
public static java.lang.String formatValue(java.lang.Object valueToFormat)
valueToFormat
- The value to format
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |