public interface Verifier
Modifier and Type | Method and Description |
---|---|
FailureMessage |
hasEmptyIntersection(int pLowerBoundFirstSet,
int pUpperBoundFirstSet,
int pLowerBoundSecondSet,
int pUpperBoundSecondSet)
Method verifies whether the first and the second set have a empty intersection.
|
FailureMessage |
hasIntersection(int pLowerBoundFirstSet,
int pUpperBoundFirstSet,
int pLowerBoundSecondSet,
int pUpperBoundSecondSet)
Method verifies whether the first and the second set have a not null intersection.
|
FailureMessage |
isFalse(boolean pCondition,
String pDescription)
Method verifies if the passed condition is false.
|
FailureMessage |
isNotNull(Object pObject,
String pObjectName)
Method verifies whether the passed object is null or not.
|
FailureMessage |
isNotPartOfSet(int pLowerBound,
int pUpperBound,
int pValue)
Method verifies whether the passed value is not part of the passed set.
|
FailureMessage |
isNull(Object pObject,
String pObjectName)
Method verifies that the passed object is null.
|
FailureMessage |
isPartOfSet(int pLowerBound,
int pUpperBound,
int pValue)
Method verifies whether the passed value is part of the passed set.
|
FailureMessage |
isRealString(String pString,
String pStringName)
Method verifies whether the passed string is a real string.
|
FailureMessage |
isSubset(int pLowerBoundSet,
int pUpperBoundSet,
int pLowerBoundSubset,
int pUpperBoundSubset)
Method verifies whether the passed set is a subset.
|
FailureMessage |
isTrue(boolean pCondition,
String pDescription)
Method verifies if the passed condition is true.
|
FailureMessage |
isValidSet(int pLowerBound,
int pUpperBound)
Method verifies whether the passed parameters define a valid set.
|
FailureMessage |
isZeroOrGreater(int pValue,
String pValueName)
Method verifies whether the passed parameter is is zero or greater or not.
|
FailureMessage |
verifyEMailAddress(String pEMailAddress)
Method verifies if the passed string represents a valid email address.
|
FailureMessage |
verifyMaximumCollectionSize(Collection<?> pCollection,
int pMaximumSize)
Method verifies whether the passed collection has the passed minimum size.
|
FailureMessage |
verifyMaxStringLength(String pString,
int pMaxLenght,
String pStringName)
Method verifies whether the passed string is not longer than the passed maximum length.
|
FailureMessage |
verifyMinimumCollectionSize(Collection<?> pCollection,
int pMinimumSize)
Method verifies whether the passed collection has the passed minimum size.
|
FailureMessage |
verifyPattern(String pCharacters,
String pPattern)
Method verifies whether the passed character sequence matches with the passed pattern.
|
FailureMessage |
verifyValidPeriod(Date pStart,
Date pEnd)
Method verifies whether the passed start and end dates define a valid period.
|
FailureMessage isNotNull(Object pObject, String pObjectName)
pObject
- Object that should be checked for null. If pObject is null an error is indicated.pObjectName
- Name of the object that is checked for null. The parameter may be null.FailureMessage isZeroOrGreater(int pValue, String pValueName)
pValue
- Value that should be check if it is zero or greater.pValueName
- Name of the value that is checked. The parameter may be null.FailureMessage isNull(Object pObject, String pObjectName)
pObject
- Object that should be checked for null. If pObject is not null an error is indicated.pObjectName
- Name of the object that is checked for null. The parameter may be null.FailureMessage isTrue(boolean pCondition, String pDescription)
pCondition
- Condition that should be check if it is true.pDescription
- Description of the condition. The parameter may be null.FailureMessage isFalse(boolean pCondition, String pDescription)
pCondition
- Condition that should be check if it is false.pDescription
- Description of the condition. The parameter may be null.FailureMessage isRealString(String pString, String pStringName)
pString
- String object that should be checked if it is a real string. If pString is null an error is
indicated.pStringName
- Name of the string that is checked. The parameter may be null.FailureMessage verifyMaxStringLength(String pString, int pMaxLenght, String pStringName)
pString
- String object that should be checked for its length. The parameter must not be null.pMaxLenght
- Maximum length the string may have.pStringName
- Name of the string that is checked. The parameter may be null.FailureMessage isValidSet(int pLowerBound, int pUpperBound)
pLowerBound
- Lower bound of the set.pUpperBound
- Upper bound of the set.FailureMessage isPartOfSet(int pLowerBound, int pUpperBound, int pValue)
pLowerBound
- Lower bound of the set. The parameter must define a valid set together with pUpperBound.pUpperBound
- Upper bound of the set. The parameter must define a valid set together with pLowerBound.pValue
- Value for which is verified if it is part of the defined set.FailureMessage isNotPartOfSet(int pLowerBound, int pUpperBound, int pValue)
pLowerBound
- Lower bound of the set. The parameter must define a valid set together with pUpperBound.pUpperBound
- Upper bound of the set. The parameter must define a valid set together with pLowerBound.pValue
- Value for which is verified if it is not part of the defined set.FailureMessage isSubset(int pLowerBoundSet, int pUpperBoundSet, int pLowerBoundSubset, int pUpperBoundSubset)
pLowerBoundSet
- Lower bound of the set. The parameter must define a valid set together with pUpperBoundSet.pUpperBoundSet
- Upper bound of the set. The parameter must define a valid set together with pLowerBoundSet.pLowerBoundSubset
- Lower bound of the subset. The parameter must define a valid set together with
pUpperBoundSubset.pUpperBoundSubset
- Upper bound of the subset. The parameter must define a valid set together with
pLowerBoundSubset.FailureMessage hasIntersection(int pLowerBoundFirstSet, int pUpperBoundFirstSet, int pLowerBoundSecondSet, int pUpperBoundSecondSet)
pLowerBoundFirstSet
- Lower bound of the first set. The parameter must define a valid set together with
pUpperBoundFirstSet.pUpperBoundFirstSet
- Upper bound of the first set. The parameter must define a valid set together with
pLowerBoundFirstSet.pLowerBoundSecondSet
- Lower bound of the second set. The parameter must define a valid set together with
pUpperBoundSecondSet.pUpperBoundSecondSet
- Upper bound of the second set. The parameter must define a valid set together with
pLowerBoundSecondSet.FailureMessage hasEmptyIntersection(int pLowerBoundFirstSet, int pUpperBoundFirstSet, int pLowerBoundSecondSet, int pUpperBoundSecondSet)
pLowerBoundFirstSet
- Lower bound of the first set. The parameter must define a valid set together with
pUpperBoundFirstSet.pUpperBoundFirstSet
- Upper bound of the first set. The parameter must define a valid set together with
pLowerBoundFirstSet.pLowerBoundSecondSet
- Lower bound of the second set. The parameter must define a valid set together with
pUpperBoundSecondSet.pUpperBoundSecondSet
- Upper bound of the second set. The parameter must define a valid set together with
pLowerBoundSecondSet.FailureMessage verifyPattern(String pCharacters, String pPattern)
pCharacters
- Character sequence to verify. The parameter must not be null.pPattern
- Regular expression pattern which will be used to verify the passed character sequence. The
parameter must not be null.FailureMessage verifyMinimumCollectionSize(Collection<?> pCollection, int pMinimumSize)
pCollection
- Collection that should be verified for its minimum size. The parameter must not be null.pMinimumSize
- Minimum size the passed collection must have. The amount of elements within the collection must
be equal or greater than this value.FailureMessage verifyMaximumCollectionSize(Collection<?> pCollection, int pMaximumSize)
pCollection
- Collection that should be verified for its maximum size. The parameter must not be null.pMaximumSize
- Maximum size the passed collection must have. The amount of elements within the collection must
be less or equal than this value.FailureMessage verifyValidPeriod(Date pStart, Date pEnd)
pStart
- Start of the period. The parameter may be null.pEnd
- End of the period. The parameter may be null.FailureMessage verifyEMailAddress(String pEMailAddress)
pEMailAddress
- Representation of the email address. The parameter may be null.FailureMessage
Verification failure describing the reason why the verification failed. If no error
occurred the method returns null. In all other cases the method returns a FailureMessage object.Copyright © 2022. All rights reserved.