CheckCompound

public abstract class CheckCompound extends CheckSingle

This Implementation of this class gets the ability to run multiple checks as a unit.

The AllCheck implementation ensures that all the checks added to it pass the validation if any one of the fails the whole check fails.

The AnyCheck implentation ensures that atleast one passed the check meaning this check will pass validatioin if one of the checks within passed.

Fields

checkList

protected List<CheckInterface> checkList

Constructors

CheckCompound

public CheckCompound(String errorMessage)

Methods

addCheck

public void addCheck(CheckInterface checkInterface)

addChecks

public void addChecks(List<CheckInterface> validationChecks)

clearError

public void clearError()

disableCheck

public void disableCheck(CheckInterface checkInterface)

disableChecks

public void disableChecks(List<CheckInterface> validationChecks)

getErrorMsg

public String getErrorMsg()

setError

public void setError(String error)