public void validate ( ) { if ( start == null || start . isEmpty ( ) ) { throw new IllegalArgumentException ( "missing or empty start" ) ; } DateTime . parseDateTimeString ( start , timezone ) ; if ( end != null && ! end . isEmpty ( ) ) { DateTime . parseDateTimeString ( end , timezone ) ; } if ( downsampler != null ) { downsampler . validate ( ) ; } if ( aggregator == null || aggregator . isEmpty ( ) ) { throw new IllegalArgumentException ( "Missing or empty aggregator" ) ; } try { Aggregators . get ( aggregator . toLowerCase ( ) ) ; } catch ( final NoSuchElementException e ) { throw new IllegalArgumentException ( "Invalid aggregator" ) ; } }
Validates the timespan