public static void validatePeriod ( Duration period ) { if ( period . equals ( Duration . ZERO ) ) { String message = "The period must be nonzero" ; throw new IllegalArgumentException ( message ) ; } }
Verifies that the given period is valid