protected final boolean isValidEndTypeForPattern ( ) { if ( getEndType ( ) == null ) { return false ; } switch ( getPatternType ( ) ) { case DAILY : case WEEKLY : case MONTHLY : case YEARLY : return ( getEndType ( ) . equals ( EndType . DATE ) || getEndType ( ) . equals ( EndType . TIMES ) ) ; case INDIVIDUAL : case NONE : return getEndType ( ) . equals ( EndType . SINGLE ) ; default : return false ; } }
Checks if the end type is valid for the set pattern type .