class AlarmService {

    public Collection<Alarm> searchAlarmsBySubscriptionTarget(String subTarget) {
        return getAllAlarms().stream().filter(alarm -> alarm.getSubscriptions().stream().anyMatch(sub -> subTarget.equals(sub.getTarget())))
            .collect(Collectors.toList());
    }

}