MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / remove

Method remove

JSAT/src/jsat/utils/IntList.java:165–176  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

163
164
165 @Override
166 public Integer remove(int index)
167 {
168 if(index < 0 || index > size())
169 throw new IndexOutOfBoundsException("Can not remove invalid index " + index);
170 int removed = array[index];
171
172 for(int i = index; i < end-1; i++)
173 array[i] = array[i+1];
174 end--;
175 return removed;
176 }
177
178 private void enlargeIfNeeded(int i)
179 {

Callers 1

runMethod · 0.95

Calls 1

sizeMethod · 0.95

Tested by

no test coverage detected