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

Method swap

chapter19/src/main/java/com/seaofnodes/simple/Ary.java:121–129  ·  view source on GitHub ↗
( int i, int j )

Source from the content-addressed store, hash-verified

119 }
120
121 public E swap( int i, int j ) {
122 range_check(i);
123 range_check(j);
124 E tmp = _es[i];
125 if( i==j ) return tmp;
126 _es[i] = _es[j];
127 _es[j] = tmp;
128 return tmp;
129 }
130
131
132 /** @param c Collection to be added */

Callers 3

localMethod · 0.45
swap12Method · 0.45
promoteMethod · 0.45

Calls 1

range_checkMethod · 0.95

Tested by

no test coverage detected