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 has to be in the appropriate range. Apply on com.yammer.dropwizard.util.Size instances.
@Constraint(validatedBy = { })
@MaxSize(value = ., unit = .)
public @interface SizeRange {
    @OverridesAttribute(constraint = MinSize.class, name = "value")
    long min() default 0;
    @OverridesAttribute(constraint = MaxSize.class, name = "value")
    long max() default .;
        @OverridesAttribute(constraint = MinSize.class, name = "unit"),
        @OverridesAttribute(constraint = MaxSize.class, name = "unit")
    })
    SizeUnit unit() default .;
    String message() default "must be between {min} {unit} and {max} {unit}";
    Class<?>[] groups() default { };
    @SuppressWarnings("UnusedDeclaration"Class<? extends Payload>[] payload() default { };

    
Defines several @SizeRange annotations on the same element.
    @Documented
    public @interface List {
        SizeRange[] value();
    }
New to GrepCode? Check out our FAQ X