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

Method equals

chapter18/src/main/java/com/seaofnodes/simple/Ary.java:184–193  ·  view source on GitHub ↗
( Object o )

Source from the content-addressed store, hash-verified

182 // underlying array. If the hashCode() is used (e.g., inserting into a
183 // HashMap) and the then the array changes, the hashCode() will change also.
184 @Override public boolean equals( Object o ) {
185 if( this==o ) return true;
186 if( !(o instanceof Ary ary) ) return false;
187 if( _len != ary._len ) return false;
188 if( _es == ary._es ) return true;
189 for( int i=0; i<_len; i++ )
190 if( !(_es[i]==null ? (ary._es[i] == null) : _es[i].equals(ary._es[i])) )
191 return false;
192 return true;
193 }
194 @Override public int hashCode( ) {
195 int sum=_len;
196 for( int i=0; i<_len; i++ )

Callers 15

computeMethod · 0.45
loadMethod · 0.45
pMethod · 0.45
toStringMethod · 0.45
execMethod · 0.45
evaluateMethod · 0.45
findSingleCFGOutMethod · 0.45
ScriptGeneratorClass · 0.45
lookupMethod · 0.45
getStructMethod · 0.45
similarMessagesMethod · 0.45
sameStackTraceOriginMethod · 0.45

Calls

no outgoing calls

Tested by 15

computeMethod · 0.36
loadMethod · 0.36
pMethod · 0.36
toStringMethod · 0.36
execMethod · 0.36
evaluateMethod · 0.36
findSingleCFGOutMethod · 0.36
lookupMethod · 0.36
getStructMethod · 0.36
similarMessagesMethod · 0.36
sameStackTraceOriginMethod · 0.36
cleanVariablesMethod · 0.36