diff options
| author | bjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu> | 2017-04-07 10:51:31 -0400 |
|---|---|---|
| committer | bjculkin <bjculkin@WIT-136XG42.wvu-ad.wvu.edu> | 2017-04-07 10:51:31 -0400 |
| commit | 63d88eb8db1f7a6d5924ec2a8b7f462373d5ac9a (patch) | |
| tree | 4a7c67b23c8e1ecb1b2f992e5dbaf3ebb48dcf6b /BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java | |
| parent | 848dc739becfa41193aff9a07c918aed91e5ef79 (diff) | |
Cleanup
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java b/BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java index 741b33d..bab64f5 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java +++ b/BJC-Utils2/src/main/java/bjc/utils/esodata/SimpleDirectory.java @@ -71,33 +71,32 @@ public class SimpleDirectory<K, V> implements Directory<K, V> { @Override public boolean equals(Object obj) { - if(this == obj) return true; - if(obj == null) return false; - if(getClass() != obj.getClass()) return false; + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof SimpleDirectory<?, ?>)) + return false; SimpleDirectory<?, ?> other = (SimpleDirectory<?, ?>) obj; - if(children == null) { - if(other.children != null) return false; - } else if(!children.equals(other.children)) return false; + if (children == null) { + if (other.children != null) + return false; + } else if (!children.equals(other.children)) + return false; - if(data == null) { - if(other.data != null) return false; - } else if(!data.equals(other.data)) return false; + if (data == null) { + if (other.data != null) + return false; + } else if (!data.equals(other.data)) + return false; return true; } @Override public String toString() { - StringBuilder builder = new StringBuilder(); - - builder.append("SimpleDirectory [children="); - builder.append(children); - builder.append(", data="); - builder.append(data); - builder.append("]"); - - return builder.toString(); + return String.format("SimpleDirectory [children=%s, data=%s]", children, data); } }
\ No newline at end of file |
