private boolean areAllInitial(List<ChangeNotifier<T>> changeNotifiers) { for (final ChangeNotifier<T> changeNotifier : changeNotifiers) { if (!ChangeNotifiers.isInitialEmptyData(changeNotifier.current())) { return false; } } return true; } }
private boolean areAllInitial(List<ChangeNotifier<T>> changeNotifiers) { for (final ChangeNotifier<T> changeNotifier : changeNotifiers) { if (!ChangeNotifiers.isInitialEmptyData(changeNotifier.current())) { return false; } } return true; } }
private Set<T> aggregateSet() { if (areAllInitial(changeNotifiers)) { return ChangeNotifiers.initialEmptyDataInstance(); } ImmutableSet.Builder<T> records = ImmutableSet.builder(); for (final ChangeNotifier<T> changeNotifier : changeNotifiers) { records.addAll(changeNotifier.current()); } return records.build(); }
private Set<T> aggregateSet() { if (areAllInitial(changeNotifiers)) { return ChangeNotifiers.initialEmptyDataInstance(); } ImmutableSet.Builder<T> records = ImmutableSet.builder(); for (final ChangeNotifier<T> changeNotifier : changeNotifiers) { records.addAll(changeNotifier.current()); } return records.build(); }