MCPcopy Create free account
hub / github.com/M66B/FairEmail / equals

Method equals

app/src/main/java/javax/mail/Flags.java:374–394  ·  view source on GitHub ↗

Check whether the two Flags objects are equal. @return true if they're equal

(Object obj)

Source from the content-addressed store, hash-verified

372 * @return true if they're equal
373 */
374 @Override
375 public boolean equals(Object obj) {
376 if (!(obj instanceof Flags))
377 return false;
378
379 Flags f = (Flags)obj;
380
381 // Check system flags
382 if (f.system_flags != this.system_flags)
383 return false;
384
385 // Check user flags
386 int size = this.user_flags == null ? 0 : this.user_flags.size();
387 int fsize = f.user_flags == null ? 0 : f.user_flags.size();
388 if (size == 0 && fsize == 0)
389 return true;
390 if (f.user_flags != null && this.user_flags != null && fsize == size)
391 return user_flags.keySet().equals(f.user_flags.keySet());
392
393 return false;
394 }
395
396 /**
397 * Compute a hash code for this Flags object.

Callers 15

uploadMethod · 0.45
waitForAnalysisMethod · 0.45
getMethod · 0.45
connectMethod · 0.45
readResolveMethod · 0.45
invokeMethod · 0.45
activateProMethod · 0.45
onReceiveMethod · 0.45
activateProMethod · 0.45
onReceiveMethod · 0.45
activateProMethod · 0.45
onReceiveMethod · 0.45

Calls 1

sizeMethod · 0.65

Tested by

no test coverage detected