private boolean isAnyThresholdReached(E e) { for (BatchingThreshold<E> threshold : thresholds) { threshold.accumulate(e); if (threshold.isThresholdReached()) { return true; } } return false; }
private void resetThresholds() { for (int i = 0; i < thresholds.size(); i++) { thresholds.set(i, thresholds.get(i).copyWithZeroedValue()); } } }
private void resetThresholds() { for (int i = 0; i < thresholds.size(); i++) { thresholds.set(i, thresholds.get(i).copyWithZeroedValue()); } } }
private boolean isAnyThresholdReached(E e) { for (BatchingThreshold<E> threshold : thresholds) { threshold.accumulate(e); if (threshold.isThresholdReached()) { return true; } } return false; }