Commit f01838de authored by Michaela Korenková's avatar Michaela Korenková
Browse files

changed equals

parent 0f3d2dbe
......@@ -54,11 +54,11 @@ public class WineBottle extends EntityBase{
if (this == o) return true;
if (!(o instanceof WineBottle)) return false;
WineBottle that = (WineBottle) o;
return getName().equals(that.getName()) && getVolume().equals(that.getVolume()) && getType().equals(that.getType()) && getGrape().equals(that.getGrape());
return getName().equals(that.getName()) && getVolume().equals(that.getVolume()) && getType().equals(that.getType());
}
@Override
public int hashCode() {
return Objects.hash(getName(), getVolume(), getType(), getGrape());
return Objects.hash(getName(), getVolume(), getType());
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment