Annotation Type TimeSpanOption
-
@OptionDetailAnnotation(applicableTo={java.lang.Integer.class,java.lang.Long.class,TimeSpan.class}) @Documented @Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface TimeSpanOption
This is an annotation for all integer options that specify some sort of time duration (e.g., a timeout). Values for options with this annotation can be given with units. Examples: 10s 5min 3h Supported units are "ns", "ms", "s", "min", and "h". Microseconds are not supported.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description TimeUnit
defaultUserUnit
The unit which should be assumed when the user does not explicitly specify a unit.long
max
An optional maximum value for this option.long
min
An optional minimum value for this option.
-
-
-
Element Detail
-
codeUnit
TimeUnit codeUnit
The unit which will be used to write the value from the user into the annotated field if the field is of type int or long. This is also the unit of the default value of this option (if one is given), and of the minimum and maximum value!
-
-
-
defaultUserUnit
TimeUnit defaultUserUnit
The unit which should be assumed when the user does not explicitly specify a unit.- Default:
- java.util.concurrent.TimeUnit.SECONDS
-
-
-
min
long min
An optional minimum value for this option. The unit of the minimum iscodeUnit()
.- Default:
- -9223372036854775808L
-
-
-
max
long max
An optional maximum value for this option. The unit of the maximum iscodeUnit()
.- Default:
- 9223372036854775807L
-
-