use static method for brevity, avoiding type params
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@980923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3296f58f71
commit
3244c46fe9
|
@ -140,7 +140,7 @@ public class EqualsBuilder implements Builder<Boolean> {
|
||||||
static Pair<IDKey, IDKey> getRegisterPair(Object lhs, Object rhs) {
|
static Pair<IDKey, IDKey> getRegisterPair(Object lhs, Object rhs) {
|
||||||
IDKey left = new IDKey(lhs);
|
IDKey left = new IDKey(lhs);
|
||||||
IDKey right = new IDKey(rhs);
|
IDKey right = new IDKey(rhs);
|
||||||
return new Pair<IDKey, IDKey>(left, right);
|
return Pair.of(left, right);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -159,8 +159,7 @@ public class EqualsBuilder implements Builder<Boolean> {
|
||||||
static boolean isRegistered(Object lhs, Object rhs) {
|
static boolean isRegistered(Object lhs, Object rhs) {
|
||||||
Set<Pair<IDKey, IDKey>> registry = getRegistry();
|
Set<Pair<IDKey, IDKey>> registry = getRegistry();
|
||||||
Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
|
Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
|
||||||
Pair<IDKey, IDKey> swappedPair = new Pair<IDKey, IDKey>(pair.right,
|
Pair<IDKey, IDKey> swappedPair = Pair.of(pair.right, pair.left);
|
||||||
pair.left);
|
|
||||||
|
|
||||||
return registry != null
|
return registry != null
|
||||||
&& (registry.contains(pair) || registry.contains(swappedPair));
|
&& (registry.contains(pair) || registry.contains(swappedPair));
|
||||||
|
|
Loading…
Reference in New Issue