From 504ca816530efdff06bc202e0432ebd354aec304 Mon Sep 17 00:00:00 2001 From: EVE Date: Tue, 14 Mar 2017 12:07:14 -0400 Subject: Cleanup --- .../src/main/java/bjc/utils/data/Identity.java | 28 +++++++++------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/Identity.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/data/Identity.java b/BJC-Utils2/src/main/java/bjc/utils/data/Identity.java index aa3f7aa..9c4ea45 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/data/Identity.java +++ b/BJC-Utils2/src/main/java/bjc/utils/data/Identity.java @@ -10,7 +10,7 @@ import java.util.function.UnaryOperator; */ /** * Simple implementation of IHolder that has no hidden behavior - * + * * @author ben * * @param @@ -28,7 +28,7 @@ public class Identity implements IHolder { /** * Create a holder holding the specified value - * + * * @param value * The value to hold */ @@ -43,35 +43,29 @@ public class Identity implements IHolder { /* * (non-Javadoc) - * + * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { - if (this == obj) { + if(this == obj) return true; - } else if (obj == null) { - return false; - } else if (getClass() != obj.getClass()) { + else if(obj == null) return false; - } + else if(getClass() != obj.getClass()) return false; Identity other = (Identity) obj; - if (heldValue == null) { - if (other.heldValue != null) { - return false; - } - } else if (!heldValue.equals(other.heldValue)) { - return false; - } + if(heldValue == null) { + if(other.heldValue != null) return false; + } else if(!heldValue.equals(other.heldValue)) return false; return true; } /* * (non-Javadoc) - * + * * @see java.lang.Object#hashCode() */ @Override @@ -80,7 +74,7 @@ public class Identity implements IHolder { int result = 1; - int fieldHash = (heldValue == null) ? 0 : heldValue.hashCode(); + int fieldHash = heldValue == null ? 0 : heldValue.hashCode(); result = prime * result + fieldHash; -- cgit v1.2.3