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) {
|
||||
IDKey left = new IDKey(lhs);
|
||||
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) {
|
||||
Set<Pair<IDKey, IDKey>> registry = getRegistry();
|
||||
Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
|
||||
Pair<IDKey, IDKey> swappedPair = new Pair<IDKey, IDKey>(pair.right,
|
||||
pair.left);
|
||||
Pair<IDKey, IDKey> swappedPair = Pair.of(pair.right, pair.left);
|
||||
|
||||
return registry != null
|
||||
&& (registry.contains(pair) || registry.contains(swappedPair));
|
||||
|
|
Loading…
Reference in New Issue