public String getTimeIntervalName ( ) { // are they the same length ? int firstValue = - 1 ; for ( TimeCoordIntvValue tinv : timeIntervals ) { int value = ( tinv . getBounds2 ( ) - tinv . getBounds1 ( ) ) ; if ( firstValue < 0 ) firstValue = value ; else if ( value != firstValue ) return MIXED_INTERVALS ; } firstValue = ( firstValue * timeUnit . getValue ( ) ) ; return firstValue + "_" + timeUnit . getField ( ) . toString ( ) ; }
Check if we all time intervals have the same length .