@Documented @Constraint(validatedBy=MicrosecondPrecisionValidator.ForTemporalAccessor.class) @Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=MicrosecondPrecision.List.class) public @interface MicrosecondPrecision
object
, validates that object.nanosecond % 1000 == 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, which implies microsecond precision; as a
result these types are not supported.
null
elements are considered valid.
Copyright © 2021–2022. All rights reserved.