Use if-else

This commit is contained in:
Gary Gregory 2024-06-23 14:21:16 -04:00
parent f5e0f2c099
commit f55d552c90
1 changed files with 113 additions and 121 deletions

View File

@ -614,8 +614,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
return true;
}
}
} else {
if (size > 0) {
} else if (size > 0) {
final int hashCode = key.hashCode();
switch (size) { // drop through
case 3:
@ -632,7 +631,6 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
}
}
}
return false;
}
@ -817,8 +815,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
return value1;
}
}
} else {
if (size > 0) {
} else if (size > 0) {
final int hashCode = key.hashCode();
switch (size) {
// drop through
@ -836,7 +833,6 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
}
}
}
return null;
}
@ -947,8 +943,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
return old;
}
}
} else {
if (size > 0) {
} else if (size > 0) {
final int hashCode = key.hashCode();
switch (size) { // drop through
case 3:
@ -971,7 +966,6 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
}
}
}
// add new mapping
switch (size) {
@ -1123,8 +1117,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
return old;
}
}
} else {
if (size > 0) {
} else if (size > 0) {
final int hashCode = key.hashCode();
switch (size) { // drop through
case 3:
@ -1191,7 +1184,6 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
}
}
}
return null;
}