@Documented @Constraint(validatedBy=MillisecondPrecisionValidator.ForTemporalAccessor.class) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=MillisecondPrecision.List.class) public @interface MillisecondPrecision
object
, validates that object.nanosecond % 1000000 == 0
.
Supported types are:
TemporalAccessor
, as long as the implementation supports ChronoField.NANO_OF_SECOND
as argument for
TemporalAccessor.get(TemporalField)
Date
and Calendar
already have millisecond precision; as a result these types are not supported.
null
elements are considered valid.
Copyright © 2021–2022. All rights reserved.