Class ContainerAdapter<T>

java.lang.Object
io.avaje.validation.adapter.ContainerAdapter<T>
Type Parameters:
T - the type we are validating
All Implemented Interfaces:
ValidationAdapter<T>

public abstract class ContainerAdapter<T> extends Object implements ValidationAdapter<T>
Adapter that validates container types.
  • Field Details

  • Constructor Details

    • ContainerAdapter

      protected ContainerAdapter(ValidationAdapter<T> initialAdapter)
      Parameters:
      initialAdapter - initial adapter that can be used to validate the container itself
  • Method Details

    • andThenMulti

      public ContainerAdapter<T> andThenMulti(ValidationAdapter<?> adapter)
      Compose the given adapter with the multiAdapter of this ContainerAdapter for validating multiple items.
    • validateAll

      protected void validateAll(Iterable<Object> value, ValidationRequest req, String propertyName)
      Execute validations for all items in the given iterable
    • validateArray

      protected void validateArray(Object[] value, ValidationRequest req, String propertyName)
      Execute validations for all items in the given array