src/main/java/com/hedera/hashgraph/identity/utils/Validator.java
/**
   * Checks if there are any validation errors and if yes throws {@link IllegalStateException}.
   *
   * @param prologue           A prologue before the errors list.
   * @param validationFunction Validation function that defines all check conditions.
   */
Checks if there are any validation errors and if yes throws  IllegalStateException.

@param prologue           A prologue before the errors list.
@param validationFunction Validation function that defines all check conditions.
Checks if there are any validation errors and if yes throws IllegalStateException . @param prologue A prologue before the errors list . @param validationFunction Validation function that defines all check conditions .
public void checkValidationErrors(final String prologue, final Consumer<Validator> validationFunction) {
    validationErrors = null;
    validationFunction.accept(this);
    if (validationErrors == null) {
      return;
    }
    List<String> errors = validationErrors;
    validationErrors = null;
    throw new IllegalStateException(prologue + ":\n" + String.join("\n", errors));
  }
public void checkValidationErrors ( final String prologue , final Consumer < Validator > validationFunction ) { validationErrors = null ; validationFunction . accept ( this ) ; if ( validationErrors == null ) { return ; } List < String > errors = validationErrors ; validationErrors = null ; throw new IllegalStateException ( prologue + ":\n" + String . join ( "\n" , errors ) ) ; }
Checks if there are any validation errors and if yes throws {@link IllegalStateException}.
Checks if there are any validation errors and if yes throws { @link IllegalStateException } .