Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.yammer.dropwizard.validation;
 
 
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

The annotated element must be a com.yammer.dropwizard.util.Duration whose value must be higher or equal to the specified minimum.

null elements are considered valid

@Constraint(validatedBy = MaxDurationValidator.class)
public @interface MaxDuration {
    String message() default "must be less than or equal to {value} {unit}";
    Class<?>[] groups() default { };
    @SuppressWarnings("UnusedDeclaration"Class<? extends Payload>[] payload() default { };

    

Returns:
value the element must be higher or equal to
    long value();

    

Returns:
unit of the value the element must be higher or equal to
    TimeUnit unit() default .;
New to GrepCode? Check out our FAQ X