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

Method equals

src/main/java/org/apache/commons/lang3/Range.java:310–323  ·  view source on GitHub ↗

Compares this range to another object to test if they are equal. To be equal, the minimum and maximum values must be equal, which ignores any differences in the comparator. @param obj the reference object with which to compare. @return true if this object is equal.

(final Object obj)

Source from the content-addressed store, hash-verified

308 * @return true if this object is equal.
309 */
310 @Override
311 public boolean equals(final Object obj) {
312 if (obj == this) {
313 return true;
314 }
315 if (obj == null || obj.getClass() != getClass()) {
316 return false;
317 }
318 @SuppressWarnings("unchecked") // OK because we checked the class above
319 final
320 Range<T> range = (Range<T>) obj;
321 return minimum.equals(range.minimum) &&
322 maximum.equals(range.maximum);
323 }
324
325 /**
326 * Fits the given element into this range by returning the given element or, if out of bounds, the range minimum if

Callers 15

intersectionWithMethod · 0.95
indexOfMethod · 0.45
isSameTypeMethod · 0.45
lastIndexOfMethod · 0.45
startsWithMethod · 0.45
toPrimitiveMethod · 0.45
testMethod · 0.45
findThreadByIdMethod · 0.45
namePredicateMethod · 0.45
countriesByLanguageMethod · 0.45
languagesByCountryMethod · 0.45

Calls 1

getClassMethod · 0.45

Tested by

no test coverage detected