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

Method remove

chapter18/src/main/java/com/seaofnodes/simple/Ary.java:73–78  ·  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

71 * @param i element to be removed
72 * @return element removed */
73 @Override public E remove( int i ) {
74 range_check(i);
75 E e = _es[i];
76 System.arraycopy(_es,i+1,_es,i,(--_len)-i);
77 return e;
78 }
79
80 /** Remove all elements */
81 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