Class ListValidation

java.lang.Object
com.example.common.validate.ListValidation
All Implemented Interfaces:
ValidatorInterface

public class ListValidation extends Object implements ValidatorInterface
The ListValidation class implements the ValidatorInterface to validate a list of validators.
  • Constructor Details

    • ListValidation

      public ListValidation()
  • Method Details

    • validate

      public boolean validate()
      Validates each validator in the list.
      Specified by:
      validate in interface ValidatorInterface
      Returns:
      true if all validators pass, false if any validator fails
    • add

      public void add(ValidatorInterface validator)
      Add new type of validator to common list
      Parameters:
      validator - the validator to add
    • remove

      public void remove(int index)
      Removes a validator from the list at the specified index.
      Parameters:
      index - the index of the validator to remove
    • size

      public int size()
      Returns the number of validators in the list.
      Returns:
      the size of the validator list