in src/main/java/org/apache/commons/collections4/map/Flat3Map.java [755:799]
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (delegateMap != null) {
return delegateMap.equals(obj);
}
if (!(obj instanceof Map)) {
return false;
}
final Map<?, ?> other = (Map<?, ?>) obj;
if (size != other.size()) {
return false;
}
if (size > 0) {
Object otherValue = null;
switch (size) { // drop through
case 3:
if (!other.containsKey(key3)) {
return false;
}
otherValue = other.get(key3);
if (!Objects.equals(value3, otherValue)) {
return false;
}
case 2:
if (!other.containsKey(key2)) {
return false;
}
otherValue = other.get(key2);
if (!Objects.equals(value2, otherValue)) {
return false;
}
case 1:
if (!other.containsKey(key1)) {
return false;
}
otherValue = other.get(key1);
if (!Objects.equals(value1, otherValue)) {
return false;
}
}
}
return true;
}