code: public void setWeeklyDaysFromBitmap(Integer days, int[] masks)
     {
        if (days != null)
        {
           int value = days.intValue();
           for (Day day : Day.values())
           {
              setWeeklyDay(day, ((value & masks[day.getValue()]) != 0));
           }
        }
     }
docs: Converts from a bitmap to individual day flags for a weekly recurrence,
  using the array of masks.
  
  @param days bitmap
  @param masks array of mask values