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