Annotation Type HumanReadableBytesRange
-
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(RUNTIME) @Documented @Constraint(validatedBy=HumanReadableBytesRangeValidator.class) public @interface HumanReadableBytesRange
This annotation is an extension of java validation framework to ensure the validity of value ofHumanReadableBytes
. To use it, put it on a field of type ofHumanReadableBytes
. For example,class Size {
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]
groups
long
max
upper bound ofHumanReadableBytes
.String
message
long
min
lower bound ofHumanReadableBytes
.Class<? extends javax.validation.Payload>[]
payload
-
-
-
Element Detail
-
min
long min
lower bound ofHumanReadableBytes
. Inclusive- Default:
- 0L
-
-
-
max
long max
upper bound ofHumanReadableBytes
. Inclusive- Default:
- 9223372036854775807L
-
-
-
groups
Class<?>[] groups
- Default:
- {}
-
-
-
message
String message
- Default:
- "value must be in the range of [{min}, {max}]"
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
- Default:
- {}
-
-