code: private CheckIntervalData nextCheckIntervalData(final int increment,
              final CheckIntervalData currentData, final State currentState, final long time) {
          CheckIntervalData nextData;
          if (stateStrategy(currentState).isCheckIntervalFinished(this, currentData, time)) {
              nextData = new CheckIntervalData(increment, time);
          } else {
              nextData = currentData.increment(increment);
          }
          return nextData;
      }
docs: Calculates the next {@code CheckIntervalData} object based on the current data and
  the current state. The next data object takes the counter increment and the current
  time into account.
  
  @param increment the increment for the internal counter
  @param currentData the current check data object
  @param currentState the current state of the circuit breaker
  @param time the current time
  @return the updated {@code CheckIntervalData} object