summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/data/Identity.java
diff options
context:
space:
mode:
authorEVE <EVE@EVE-PC>2017-03-14 12:07:14 -0400
committerEVE <EVE@EVE-PC>2017-03-14 12:07:14 -0400
commit504ca816530efdff06bc202e0432ebd354aec304 (patch)
tree4836932fb81d1d625470502c78c94d202c9a7420 /BJC-Utils2/src/main/java/bjc/utils/data/Identity.java
parent5c1163df17c46f7d3e15b6c7949c38843ec56146 (diff)
Cleanup
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/data/Identity.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/data/Identity.java28
1 files changed, 11 insertions, 17 deletions
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 <ContainedType>
@@ -28,7 +28,7 @@ public class Identity<ContainedType> implements IHolder<ContainedType> {
/**
* Create a holder holding the specified value
- *
+ *
* @param value
* The value to hold
*/
@@ -43,35 +43,29 @@ public class Identity<ContainedType> implements IHolder<ContainedType> {
/*
* (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<ContainedType> implements IHolder<ContainedType> {
int result = 1;
- int fieldHash = (heldValue == null) ? 0 : heldValue.hashCode();
+ int fieldHash = heldValue == null ? 0 : heldValue.hashCode();
result = prime * result + fieldHash;