From: Roland Häder Date: Sun, 22 Jan 2023 03:45:52 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=63f79ca3409e84de35e3747e524c765833634f68;p=jshop-core.git Continued: - moved class member to proper position (sorted members) --- diff --git a/src/org/mxchange/jshopcore/model/order/items/OrderItem.java b/src/org/mxchange/jshopcore/model/order/items/OrderItem.java index 78884f4..a28017e 100644 --- a/src/org/mxchange/jshopcore/model/order/items/OrderItem.java +++ b/src/org/mxchange/jshopcore/model/order/items/OrderItem.java @@ -111,15 +111,6 @@ public class OrderItem extends BaseItem implements AddableBasketItem { return Objects.equals(this.product, item.getItemProduct()); } - @Override - public int hashCode () { - int hash = 3; - hash = 53 * hash + Objects.hashCode(this.getItemType()); - hash = 53 * hash + Objects.hashCode(this.getOrderedAmount()); - hash = 53 * hash + Objects.hashCode(this.getItemProduct()); - return hash; - } - @Override public Long getItemId () { return this.itemId; @@ -160,4 +151,13 @@ public class OrderItem extends BaseItem implements AddableBasketItem { this.orderedAmount = orderedAmount; } + @Override + public int hashCode () { + int hash = 3; + hash = 53 * hash + Objects.hashCode(this.getItemType()); + hash = 53 * hash + Objects.hashCode(this.getOrderedAmount()); + hash = 53 * hash + Objects.hashCode(this.getItemProduct()); + return hash; + } + }