From a22286fd303de1ad8a10a44c618b5fc0b6c8f926 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 6 Oct 2022 17:13:38 +0200 Subject: [PATCH] Continued: - renamed utility classes *s to *Utils - moved them into own package --- .../jfinancials/model/receipt/FinancialReceipt.java | 12 ++++++------ .../model/receipt_item/FinancialReceiptItem.java | 8 ++++---- .../model/{income => utils}/IncomeUtils.java | 2 +- .../ReceiptItemUtils.java} | 7 ++++--- .../Receipts.java => utils/ReceiptUtils.java} | 7 ++++--- 5 files changed, 19 insertions(+), 17 deletions(-) rename src/org/mxchange/jfinancials/model/{income => utils}/IncomeUtils.java (95%) rename src/org/mxchange/jfinancials/model/{receipt_item/ReceiptItems.java => utils/ReceiptItemUtils.java} (97%) rename src/org/mxchange/jfinancials/model/{receipt/Receipts.java => utils/ReceiptUtils.java} (97%) diff --git a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java index 3cc6bfb..bad9580 100644 --- a/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java +++ b/src/org/mxchange/jfinancials/model/receipt/FinancialReceipt.java @@ -41,17 +41,17 @@ import org.apache.commons.lang3.StringUtils; import org.mxchange.jbonuscard.model.bonus_card.BonusCard; import org.mxchange.jbonuscard.model.bonus_card.RoyalityCard; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; -import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffices; import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice; import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee; import org.mxchange.jcontactsbusiness.model.employee.Employable; -import org.mxchange.jcontactsbusiness.model.employee.Employees; +import org.mxchange.jcontactsbusiness.model.utils.BranchOfficeUtils; +import org.mxchange.jcontactsbusiness.model.utils.EmployeeUtils; import org.mxchange.jcoreutils.Comparables; import org.mxchange.jcoreutils.SafeNumberUtils; import org.mxchange.jproduct.model.payment.PaymentType; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; -import org.mxchange.jusercore.model.user.Users; +import org.mxchange.jusercore.model.utils.UserUtils; /** * Receipt POJO @@ -292,11 +292,11 @@ public class FinancialReceipt implements BillableReceipt { // ... issue date this.getReceiptIssued().compareTo(billableReceipt.getReceiptIssued()), // ... next is seller instance - Employees.compare(this.getReceiptSellerEmployee(), billableReceipt.getReceiptSellerEmployee()), + EmployeeUtils.compare(this.getReceiptSellerEmployee(), billableReceipt.getReceiptSellerEmployee()), // .. branch office - BranchOffices.compare(this.getReceiptBranchOffice(), billableReceipt.getReceiptBranchOffice()), + BranchOfficeUtils.compare(this.getReceiptBranchOffice(), billableReceipt.getReceiptBranchOffice()), // ... and user instance - Users.compare(this.getReceiptUser(), billableReceipt.getReceiptUser()) + UserUtils.compare(this.getReceiptUser(), billableReceipt.getReceiptUser()) }; // Check all values diff --git a/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java b/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java index cb8da48..8ce2d05 100644 --- a/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java +++ b/src/org/mxchange/jfinancials/model/receipt_item/FinancialReceiptItem.java @@ -42,10 +42,10 @@ import org.mxchange.jcoreutils.Comparables; import org.mxchange.jcoreutils.SafeNumberUtils; import org.mxchange.jfinancials.model.receipt.BillableReceipt; import org.mxchange.jfinancials.model.receipt.FinancialReceipt; -import org.mxchange.jfinancials.model.receipt.Receipts; +import org.mxchange.jfinancials.model.utils.ReceiptUtils; import org.mxchange.jproduct.model.product.GenericProduct; import org.mxchange.jproduct.model.product.Product; -import org.mxchange.jproduct.model.product.Products; +import org.mxchange.jproduct.model.utils.ProductUtils; /** * A POJO for receipt items @@ -250,9 +250,9 @@ public class FinancialReceiptItem implements BillableReceiptItem { // ... product quanity this.getItemProductQuantity().compareTo(billableReceiptItem.getItemProductQuantity()), // ... product instance - Products.compare(this.getItemProduct(), billableReceiptItem.getItemProduct()), + ProductUtils.compare(this.getItemProduct(), billableReceiptItem.getItemProduct()), // and finally receipt instance - Receipts.compare(this.getItemReceipt(), billableReceiptItem.getItemReceipt()) + ReceiptUtils.compare(this.getItemReceipt(), billableReceiptItem.getItemReceipt()) }; // Check all values diff --git a/src/org/mxchange/jfinancials/model/income/IncomeUtils.java b/src/org/mxchange/jfinancials/model/utils/IncomeUtils.java similarity index 95% rename from src/org/mxchange/jfinancials/model/income/IncomeUtils.java rename to src/org/mxchange/jfinancials/model/utils/IncomeUtils.java index 6db7f90..6bebeae 100644 --- a/src/org/mxchange/jfinancials/model/income/IncomeUtils.java +++ b/src/org/mxchange/jfinancials/model/utils/IncomeUtils.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.jfinancials.model.income; +package org.mxchange.jfinancials.model.utils; import java.io.Serializable; diff --git a/src/org/mxchange/jfinancials/model/receipt_item/ReceiptItems.java b/src/org/mxchange/jfinancials/model/utils/ReceiptItemUtils.java similarity index 97% rename from src/org/mxchange/jfinancials/model/receipt_item/ReceiptItems.java rename to src/org/mxchange/jfinancials/model/utils/ReceiptItemUtils.java index b47afca..f3da633 100644 --- a/src/org/mxchange/jfinancials/model/receipt_item/ReceiptItems.java +++ b/src/org/mxchange/jfinancials/model/utils/ReceiptItemUtils.java @@ -14,18 +14,19 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.jfinancials.model.receipt_item; +package org.mxchange.jfinancials.model.utils; import java.io.Serializable; import java.text.MessageFormat; import java.util.Objects; +import org.mxchange.jfinancials.model.receipt_item.BillableReceiptItem; /** * A utilities class for receipt items * * @author Roland Häder */ -public class ReceiptItems implements Serializable { +public class ReceiptItemUtils implements Serializable { /** * Serial number @@ -160,7 +161,7 @@ public class ReceiptItems implements Serializable { /** * Private default constructor */ - private ReceiptItems () { + private ReceiptItemUtils () { // Utilities don't have instances } diff --git a/src/org/mxchange/jfinancials/model/receipt/Receipts.java b/src/org/mxchange/jfinancials/model/utils/ReceiptUtils.java similarity index 97% rename from src/org/mxchange/jfinancials/model/receipt/Receipts.java rename to src/org/mxchange/jfinancials/model/utils/ReceiptUtils.java index ba8f72f..8788fc3 100644 --- a/src/org/mxchange/jfinancials/model/receipt/Receipts.java +++ b/src/org/mxchange/jfinancials/model/utils/ReceiptUtils.java @@ -14,18 +14,19 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -package org.mxchange.jfinancials.model.receipt; +package org.mxchange.jfinancials.model.utils; import java.io.Serializable; import java.text.MessageFormat; import java.util.Objects; +import org.mxchange.jfinancials.model.receipt.BillableReceipt; /** * A utilities class for receipts * * @author Roland Häder */ -public class Receipts implements Serializable { +public class ReceiptUtils implements Serializable { /** * Serial number @@ -177,7 +178,7 @@ public class Receipts implements Serializable { /** * Private default constructor */ - private Receipts () { + private ReceiptUtils () { // Utilities don't have instances } -- 2.39.5