Slightly larger En/Decoder buffers, isSimilar for Brew

This commit is contained in:
Sn0wStorm
2019-10-11 18:06:18 +02:00
parent 2121bf5c8a
commit 562f96e4b1
6 changed files with 59 additions and 17 deletions
+14
View File
@@ -222,6 +222,20 @@ public class Brew {
return copy;
}*/
public boolean isSimilar(Brew brew) {
if (brew == null) return false;
if (equals(brew)) return true;
return quality == brew.quality &&
distillRuns == brew.distillRuns &&
Float.compare(brew.ageTime, ageTime) == 0 &&
Float.compare(brew.wood, wood) == 0 &&
unlabeled == brew.unlabeled &&
persistent == brew.persistent &&
immutable == brew.immutable &&
ingredients.equals(brew.ingredients) &&
currentRecipe != null ? currentRecipe.equals(brew.currentRecipe) : brew.currentRecipe == null;
}
// Clones this instance
@Override
public Brew clone() throws CloneNotSupportedException {