Code example for List

Methods: isEmpty, remove

0
     * 
     * @return the next scheduled alarm, wrapped in a 
     *         {@link ShadowAlarmManager.ScheduledAlarm} object 
     */ 
    public ScheduledAlarm getNextScheduledAlarm() { 
        if (scheduledAlarms.isEmpty()) {
            return null; 
        } else { 
            return scheduledAlarms.remove(0);
        } 
    } 
 
    /** 
     * Non-Android accessor returns the most recent scheduled alarm without 
     * consuming it. 
     * 
     * @return the most recently scheduled alarm, wrapped in a 
     *         {@link ShadowAlarmManager.ScheduledAlarm} object 
     */ 
    public ScheduledAlarm peekNextScheduledAlarm() { 
        if (scheduledAlarms.isEmpty()) {