Code example for List

Methods: get, isEmpty

0
     * 
     * @return the most recently scheduled alarm, wrapped in a 
     *         {@link ShadowAlarmManager.ScheduledAlarm} object 
     */ 
    public ScheduledAlarm peekNextScheduledAlarm() { 
        if (scheduledAlarms.isEmpty()) {
            return null; 
        } else { 
            return scheduledAlarms.get(0);
        } 
    } 
 
    public List<ScheduledAlarm> getScheduledAlarms() {
        return scheduledAlarms;
    } 
 
    @Implementation 
    public void cancel(PendingIntent pendingIntent) {
        final Intent intentTypeToRemove = shadowOf(pendingIntent).getSavedIntent();
        for (ScheduledAlarm scheduledAlarm : new ArrayList<ScheduledAlarm>(scheduledAlarms)) {
            final Intent alarmIntent = shadowOf(scheduledAlarm.operation).getSavedIntent();