src/main/java/chalmers/pimp/model/command/CommandManager.java
private void ensureSize(Deque<?> deque) {
    Objects.requireNonNull(deque);
    while (deque.size() > THRESHOLD) {
      deque.removeLast();
    }
  }
/**
   * Ensures that the supplied deque doesn't supercede the value of {@link
   * CommandManager#THRESHOLD}.
   *
   * @param deque the deque that will be checked.
   * @throws NullPointerException if any arguments are {@code null}.
   */
Ensures that the supplied deque doesn't supercede the value of {@link
CommandManager#THRESHOLD}.

@param deque the deque that will be checked.
@throws NullPointerException if any arguments are  null.
Ensures that the supplied deque doesn ' t supercede the value of { @link CommandManager#THRESHOLD } . @param deque the deque that will be checked . @throws NullPointerException if any arguments are null .
private void ensureSize(Deque<?> deque) {
    Objects.requireNonNull(deque);
    while (deque.size() > THRESHOLD) {
      deque.removeLast();
    }
  }
private void ensureSize ( Deque < ? > deque ) { Objects . requireNonNull ( deque ) ; while ( deque . size ( ) > THRESHOLD ) { deque . removeLast ( ) ; } }
Ensures that the supplied deque doesn't supercede the value of {@link
 CommandManager#THRESHOLD}.
Ensures that the supplied deque doesn ' t supercede the value of { @link CommandManager#THRESHOLD } .