MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / remove

Method remove

chapter19/src/main/java/com/seaofnodes/simple/Ary.java:72–77  ·  view source on GitHub ↗

Slow, linear-time, element removal. Preserves order. @param i element to be removed @return element removed

( int i )

Source from the content-addressed store, hash-verified

70 * @param i element to be removed
71 * @return element removed */
72 @Override public E remove( int i ) {
73 range_check(i);
74 E e = _es[i];
75 System.arraycopy(_es,i+1,_es,i,(--_len)-i);
76 return e;
77 }
78
79 /** Remove all elements */
80 public void clear( ) { _len=0; }

Callers 12

genStructMethod · 0.45
_prettyPrintScheduledMethod · 0.45
printLineMethod · 0.45
unlockMethod · 0.45
hFunction · 0.45
SnFunction · 0.45
d3.v7.min.jsFile · 0.45
cFunction · 0.45
replaceElementFunction · 0.45
insertChildrenFunction · 0.45
removeDrawnEdgeFunction · 0.45
removeDrawnNodeFunction · 0.45

Calls 1

range_checkMethod · 0.95

Tested by 1

genStructMethod · 0.36