Class Validator<T>

java.lang.Object
org.jclouds.predicates.Validator<T>
Type Parameters:
T - Type of object to be validated. For generic validation (where object's class is determined in validate(Object), use Object.
All Implemented Interfaces:
com.google.common.base.Predicate<T>, Predicate<T>
Direct Known Subclasses:
AllLowerCaseValidator, AzureNameValidator, BlockIdValidator, BucketNameValidator, DescriptionValidator, DnsNameValidator, FilesystemBlobKeyValidator, FilesystemContainerNameValidator, PartSizeValidator, PayloadValidator, VaultNameValidator

public abstract class Validator<T> extends Object implements com.google.common.base.Predicate<T>
Abstract class that creates a bridge between Predicate and ParamValidatorss.
See Also:
  • Predicate
  • Constructor Details

    • Validator

      public Validator()
  • Method Details

    • apply

      public boolean apply(@Nullable T t)
      Specified by:
      apply in interface com.google.common.base.Predicate<T>
    • test

      public boolean test(@Nullable T t)
      Specified by:
      test in interface com.google.common.base.Predicate<T>
      Specified by:
      test in interface Predicate<T>
    • validate

      public abstract void validate(@Nullable T t) throws IllegalArgumentException
      Validates the parameter
      Parameters:
      t - parameter to be validated
      Throws:
      IllegalArgumentException - if validation failed