(String functionName)
| 474 | |
| 475 | |
| 476 | private void checkMinMax(String functionName) { |
| 477 | if (count == 0) { |
| 478 | String msg = |
| 479 | String.format("Cannot use %s() on an empty %s.", |
| 480 | functionName, getClass().getSimpleName()); |
| 481 | throw new RuntimeException(msg); |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | |
| 486 | /** |