mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 11:59:11 +00:00
Remove redundant casts, unnecessary object creation, and string ==
This commit is contained in:
1 parent
100784b51b
commit
a4cd13282a
57 files changed
+180
-156
No files matched your search
@@ -5,6 +5,7 @@ import binnie.extratrees.alcohol.drink.DrinkManager;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public enum Cocktail {
|
||||
Bellini("Bellini", Glassware.Flute, 15974764),
|
||||
@@ -58,7 +59,7 @@ public enum Cocktail {
|
||||
for (final Cocktail cocktail : values()) {
|
||||
boolean is = true;
|
||||
for (final Map.Entry<ICocktailIngredient, Integer> entry : ingredients.entrySet()) {
|
||||
if (cocktail.ingredients.get(entry.getKey()) != entry.getValue()) {
|
||||
if (!Objects.equals(cocktail.ingredients.get(entry.getKey()), entry.getValue())) {
|
||||
is = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user