code: private RecurrenceType getRecurrenceType(int value)
     {
        RecurrenceType result;
        if (value < 0 || value >= RECURRENCE_TYPES.length)
        {
           result = null;
        }
        else
        {
           result = RECURRENCE_TYPES[value];
        }
  
        return result;
     }
docs: Retrieve the recurrence type.
  
  @param value integer value
  @return RecurrenceType instance