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

Method equals

chapter16/src/main/java/com/seaofnodes/simple/Ary.java:200–209  ·  view source on GitHub ↗
( Object o )

Source from the content-addressed store, hash-verified

198 // underlying array. If the hashCode() is used (e.g., inserting into a
199 // HashMap) and the then the array changes, the hashCode() will change also.
200 @Override public boolean equals( Object o ) {
201 if( this==o ) return true;
202 if( !(o instanceof Ary ary) ) return false;
203 if( _len != ary._len ) return false;
204 if( _es == ary._es ) return true;
205 for( int i=0; i<_len; i++ )
206 if( !(_es[i]==null ? (ary._es[i] == null) : _es[i].equals(ary._es[i])) )
207 return false;
208 return true;
209 }
210 @Override public int hashCode( ) {
211 int sum=_len;
212 for( int i=0; i<_len; i++ )

Callers 14

pMethod · 0.45
toStringMethod · 0.45
execMethod · 0.45
ScriptGeneratorClass · 0.45
lookupMethod · 0.45
getStructMethod · 0.45
similarMessagesMethod · 0.45
sameStackTraceOriginMethod · 0.45
cleanVariablesMethod · 0.45
doAllReplacementsMethod · 0.45
reduceMethod · 0.45
neqMethod · 0.45

Calls

no outgoing calls

Tested by 11

pMethod · 0.36
toStringMethod · 0.36
execMethod · 0.36
lookupMethod · 0.36
getStructMethod · 0.36
similarMessagesMethod · 0.36
sameStackTraceOriginMethod · 0.36
cleanVariablesMethod · 0.36
doAllReplacementsMethod · 0.36
reduceMethod · 0.36
neqMethod · 0.36