All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.avaje.validation.adapter.IterableValidationAdapter Maven / Gradle / Ivy

Go to download

validator for annotated pojos using constraint annotations and source code generation

There is a newer version: 2.4
Show newest version
package io.avaje.validation.adapter;

final class IterableValidationAdapter extends ContainerAdapter {

  IterableValidationAdapter(ValidationAdapter adapters) {
    super(adapters);
  }

  @Override
  @SuppressWarnings("unchecked")
  public boolean validate(T value, ValidationRequest req, String propertyName) {
    if (initalAdapter.validate(value, req, propertyName)) {
      validateAll((Iterable) value, req, propertyName);
    }

    return true;
  }
}