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

Method find

chapter21/src/main/java/com/seaofnodes/simple/Ary.java:180–183  ·  view source on GitHub ↗

Find the first matching element using ==, or -1 if none. Note that most del calls shuffle the list, so the first element might be random. @param e Element to find @return index of first matching element, or -1 if none

( E e )

Source from the content-addressed store, hash-verified

178 * @param e Element to find
179 * @return index of first matching element, or -1 if none */
180 public int find( E e ) {
181 for( int i=0; i<_len; i++ ) if( _es[i]==e ) return i;
182 return -1;
183 }
184
185
186 /** @return an iterator */

Callers 9

_prettyPrintScheduledMethod · 0.95
parallelAssignPhisMethod · 0.45
loadMethod · 0.45
storeMethod · 0.45
getFieldIndexMethod · 0.45
buildMethod · 0.45
doReplacementMethod · 0.45
cleanVariablesMethod · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by 7

parallelAssignPhisMethod · 0.36
loadMethod · 0.36
storeMethod · 0.36
getFieldIndexMethod · 0.36
buildMethod · 0.36
doReplacementMethod · 0.36
cleanVariablesMethod · 0.36