MCPcopy Index your code
hub / github.com/wangzheng0822/algo / checkIndex

Method checkIndex

java/05_array/GenericArray.java:152–156  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

150 }
151
152 private void checkIndex(int index) {
153 if (index < 0 || index >= size) {
154 throw new IllegalArgumentException("Add failed! Require index >=0 and index < size.");
155 }
156 }
157
158 private void checkIndexForAdd(int index) {
159 if(index < 0 || index > size) {

Callers 3

setMethod · 0.95
getMethod · 0.95
removeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected