MCPcopy Create free account
hub / github.com/apache/commons-lang / equals

Method equals

src/main/java/org/apache/commons/lang3/tuple/Pair.java:167–178  ·  view source on GitHub ↗

Compares this pair to another based on the two elements. @param obj the object to compare to, null returns false. @return true if the elements of the pair are equal.

(final Object obj)

Source from the content-addressed store, hash-verified

165 * @return true if the elements of the pair are equal.
166 */
167 @Override
168 public boolean equals(final Object obj) {
169 if (obj == this) {
170 return true;
171 }
172 if (obj instanceof Map.Entry<?, ?>) {
173 final Map.Entry<?, ?> other = (Map.Entry<?, ?>) obj;
174 return Objects.equals(getKey(), other.getKey())
175 && Objects.equals(getValue(), other.getValue());
176 }
177 return false;
178 }
179
180 /**
181 * Gets the key from this pair.

Callers 6

indexOfMethod · 0.45
removeCommonFramesMethod · 0.45
throwableOfMethod · 0.45
getContextValuesMethod · 0.45
getFirstContextValueMethod · 0.45
setContextValueMethod · 0.45

Calls 3

getKeyMethod · 0.95
getValueMethod · 0.95
getValueMethod · 0.65

Tested by

no test coverage detected