libs.commons-lang3.classpath=\
- ${base}/commons-lang3/commons-lang3-3.5.jar
-libs.commons-lang3.displayName=Commons Lang3 3.5
+ ${base}/commons-lang3/commons-lang3-3.7.jar
+libs.commons-lang3.displayName=Commons Lang3 3.7
libs.commons-lang3.javadoc=\
https://commons.apache.org/proper/commons-lang/javadocs/api-release/
libs.CopyLibs.classpath=\
--- /dev/null
+/*
+ * Copyright (C) 2018 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.model.basicdata;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * An utilities class for basic company data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BasicDataUtils implements Serializable {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 159_847_673_672_091L;
+
+ /**
+ * Compares both basic company data instances. This method returns -1 if
+ * second instance is null.
+ * <p>
+ * @param basicData1 Basic company data instance 1
+ * @param basicData2 Basic company data instance 2
+ * <p>
+ * @return Comparison value
+ */
+ public static int compare (final BasicData basicData1, final BasicData basicData2) {
+ // Check euqality, then at least first must be given
+ if (Objects.equals(basicData1, basicData2)) {
+ // Both are same
+ return 0;
+ } else if (null == basicData1) {
+ // First is null
+ return -1;
+ } else if (null == basicData2) {
+ // Second is null
+ return 1;
+ }
+
+ // Invoke compareTo() method
+ return basicData1.compareTo(basicData2);
+ }
+
+ /**
+ * Utility classes should not have instances
+ */
+ private BasicDataUtils () {
+ // Private constructor
+ }
+
+}