Package org.jclouds.predicates
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 invalidate(Object)
, useObject
.
- All Implemented Interfaces:
com.google.common.base.Predicate<T>
,Predicate<T>
- Direct Known Subclasses:
AllLowerCaseValidator
,AzureNameValidator
,BlockIdValidator
,BucketNameValidator
,DnsNameValidator
,FilesystemBlobKeyValidator
,FilesystemContainerNameValidator
public abstract class Validator<T> extends Object implements com.google.common.base.Predicate<T>
Abstract class that creates a bridge betweenPredicate
andParamValidators
s.- See Also:
Predicate
-
-
Constructor Summary
Constructors Constructor Description Validator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
apply(T t)
boolean
test(T t)
abstract void
validate(T t)
Validates the parameter
-
-
-
Method Detail
-
apply
public boolean apply(@Nullable T t)
- Specified by:
apply
in interfacecom.google.common.base.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
-
-