深度之眼数据科学家12周速成
private void rangeCheck(int index) {
if (index < 0 || index >= size) {
throw new RuntimeException("The index is invalid! The index: " + index);
}
}
private void rangeCheckForAdd(int index) {
if (index < 0 || index > size) {
throw new RuntimeException("The index for adding is invalid! The index: " + index);
}
}