Code example for TreeMap

Methods: keySet, size

0
    PendingAlarm alarm = pendingAlarms.get(alarmId);
    return alarm == null ? null : alarm.time();
  } 
 
  public AlarmTime[] pendingTimes() { 
    AlarmTime[] times = new AlarmTime[alarmTimes.size()];
    alarmTimes.keySet().toArray(times);
    return times;
  } 
 
  public Long[] pendingAlarms() {
    Long[] alarmIds = new Long[pendingAlarms.size()];
    pendingAlarms.keySet().toArray(alarmIds);
    return alarmIds;
  } 
 
  private class PendingAlarm { 
    private AlarmTime time;
    private PendingIntent pendingIntent;
 
    PendingAlarm(AlarmTime time, PendingIntent pendingIntent) {