private boolean moreDates ( Calendar calendar , List < Date > dates ) { boolean result ; if ( m_finishDate == null ) { int occurrences = NumberHelper . getInt ( m_occurrences ) ; if ( occurrences < 1 ) { occurrences = 1 ; } result = dates . size ( ) < occurrences ; } else { result = calendar . getTimeInMillis ( ) <= m_finishDate . getTime ( ) ; } return result ; }
Determines if we need to calculate more dates . If we do not have a finish date this method falls back on using the occurrences attribute . If we have a finish date we ll use that instead . We re assuming that the recurring data has one or other of those values .