@Test public void getAll() throws Exception { final AlarmGroups alarmGroups = new AlarmGroups(); final Alarm classicAlarm = new Alarm(); final Alarm expansionAlarm = Alarm.generateExpansionAlarmTestCase(); final Alarm voiceAlarm = Alarm.generateVoiceAlarmTestCase(); alarmGroups.getClassic().add(classicAlarm); alarmGroups.getExpansions().add(expansionAlarm); alarmGroups.getVoice().add(voiceAlarm); final List<Alarm> returnedAlarms = AlarmGroups.getAll(alarmGroups); assertNotNull(returnedAlarms); assertTrue(returnedAlarms.contains(classicAlarm)); assertTrue(returnedAlarms.contains(expansionAlarm)); assertTrue(returnedAlarms.contains(voiceAlarm)); }
public static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups) { final ArrayList<Alarm> alarms = new ArrayList<>(alarmGroups.getTotalSize()); alarms.addAll(alarmGroups.getClassic()); alarms.addAll(alarmGroups.getVoice()); alarms.addAll(alarmGroups.getExpansions()); return alarms; }
AlarmGroups extends ApiResponse { public static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups) { final ArrayList<Alarm> alarms = new ArrayList<>(alarmGroups.getTotalSize()); alarms.addAll(alarmGroups.getClassic()); alarms.addAll(alarmGroups.getVoice()); alarms.addAll(alarmGroups.getExpansions()); return alarms; } }
AlarmGroups extends ApiResponse { public static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups) { final ArrayList<Alarm> alarms = new ArrayList<>(alarmGroups.getTotalSize()); alarms.addAll(alarmGroups.getClassic()); alarms.addAll(alarmGroups.getVoice()); alarms.addAll(alarmGroups.getExpansions()); return alarms; } AlarmGroups(); }
AlarmGroups extends ApiResponse { public static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups) { final ArrayList<Alarm> alarms = new ArrayList<>(alarmGroups.getTotalSize()); alarms.addAll(alarmGroups.getClassic()); alarms.addAll(alarmGroups.getVoice()); alarms.addAll(alarmGroups.getExpansions()); return alarms; } AlarmGroups(); ArrayList<Alarm> getExpansions(); ArrayList<Alarm> getVoice(); ArrayList<Alarm> getClassic(); int getTotalSize(); static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups); static AlarmGroups from(@NonNull final List<Alarm> alarms); }
AlarmGroups extends ApiResponse { public static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups) { final ArrayList<Alarm> alarms = new ArrayList<>(alarmGroups.getTotalSize()); alarms.addAll(alarmGroups.getClassic()); alarms.addAll(alarmGroups.getVoice()); alarms.addAll(alarmGroups.getExpansions()); return alarms; } AlarmGroups(); ArrayList<Alarm> getExpansions(); ArrayList<Alarm> getVoice(); ArrayList<Alarm> getClassic(); int getTotalSize(); static ArrayList<Alarm> getAll(@NonNull final AlarmGroups alarmGroups); static AlarmGroups from(@NonNull final List<Alarm> alarms);  }