Changeset 9371 in josm for trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java
- Timestamp:
- 2016-01-09T23:20:37+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java
r8910 r9371 6 6 import java.util.Collection; 7 7 import java.util.List; 8 import java.util.Objects; 8 9 9 10 import javax.swing.Icon; … … 103 104 @Override 104 105 public int hashCode() { 105 final int prime = 31; 106 int result = super.hashCode(); 107 result = prime * result + ((conflict == null) ? 0 : conflict.hashCode()); 108 result = prime * result + ((mergeItems == null) ? 0 : mergeItems.hashCode()); 109 return result; 106 return Objects.hash(super.hashCode(), conflict, mergeItems); 110 107 } 111 108 112 109 @Override 113 110 public boolean equals(Object obj) { 114 if (this == obj) 115 return true; 116 if (!super.equals(obj)) 117 return false; 118 if (getClass() != obj.getClass()) 119 return false; 120 TagConflictResolveCommand other = (TagConflictResolveCommand) obj; 121 if (conflict == null) { 122 if (other.conflict != null) 123 return false; 124 } else if (!conflict.equals(other.conflict)) 125 return false; 126 if (mergeItems == null) { 127 if (other.mergeItems != null) 128 return false; 129 } else if (!mergeItems.equals(other.mergeItems)) 130 return false; 131 return true; 111 if (this == obj) return true; 112 if (obj == null || getClass() != obj.getClass()) return false; 113 if (!super.equals(obj)) return false; 114 TagConflictResolveCommand that = (TagConflictResolveCommand) obj; 115 return Objects.equals(conflict, that.conflict) && 116 Objects.equals(mergeItems, that.mergeItems); 132 117 } 133 118 }
Note:
See TracChangeset
for help on using the changeset viewer.