diff options
| author | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
|---|---|---|
| committer | bjculkin <bjculkin@mix.wvu.edu> | 2018-02-12 22:45:04 -0500 |
| commit | df94066e3af02ff02d5ab4d033a3d603f743234c (patch) | |
| tree | 168a1edaf58d386c175ffb601e9d4da8e13d31e2 /base/src/main/java/bjc/utils/data/Identity.java | |
| parent | ae51c587c53f7ca311e556e3cbd0c5566d6c2843 (diff) | |
Formatting pass
Diffstat (limited to 'base/src/main/java/bjc/utils/data/Identity.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/Identity.java | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/base/src/main/java/bjc/utils/data/Identity.java b/base/src/main/java/bjc/utils/data/Identity.java index 3acb5aa..44ddc31 100644 --- a/base/src/main/java/bjc/utils/data/Identity.java +++ b/base/src/main/java/bjc/utils/data/Identity.java @@ -9,7 +9,7 @@ import java.util.function.UnaryOperator; * @author ben * * @param <ContainedType> - * The type contained in the holder. + * The type contained in the holder. */ public class Identity<ContainedType> implements IHolder<ContainedType> { /* The held value. */ @@ -24,7 +24,7 @@ public class Identity<ContainedType> implements IHolder<ContainedType> { * Create a holder holding the specified value. * * @param value - * The value to hold. + * The value to hold. */ public Identity(final ContainedType value) { heldValue = value; @@ -47,15 +47,15 @@ public class Identity<ContainedType> implements IHolder<ContainedType> { @Override public boolean equals(final Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (!(obj instanceof Identity)) return false; + if(this == obj) return true; + if(obj == null) return false; + if(!(obj instanceof Identity)) return false; final 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; } @@ -93,10 +93,9 @@ public class Identity<ContainedType> implements IHolder<ContainedType> { * Create a new identity container. * * @param val - * The contained value. + * The contained value. * - * @return - * A new identity container. + * @return A new identity container. */ public static <ContainedType> Identity<ContainedType> id(final ContainedType val) { return new Identity<>(val); @@ -105,8 +104,7 @@ public class Identity<ContainedType> implements IHolder<ContainedType> { /** * Create a new empty identity container. * - * @return - * A new empty identity container. + * @return A new empty identity container. */ public static <ContainedType> Identity<ContainedType> id() { return new Identity<>(); |
