MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / equals

Method equals

src/main/java/field/utility/UnorderedPair.java:21–31  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

19 }
20
21 @Override
22 public boolean equals(Object o) {
23 if (this == o) return true;
24 if (!(o instanceof UnorderedPair)) return false;
25
26 UnorderedPair<?> that = (UnorderedPair<?>) o;
27
28 if (compare(first, that.first) && compare(second, that.second)) return true;
29 if (compare(second, that.first) && compare(first, that.second)) return true;
30 return false;
31 }
32
33 private boolean compare(Object a, Object b) {
34 if (a == null) return b != null;

Callers 1

compareMethod · 0.45

Calls 1

compareMethod · 0.95

Tested by

no test coverage detected