@Override
    public boolean equals(@Nullable Object o) {
        if (!(o instanceof Pair)) {
            return false;
        }
        Pair<?, ?> p = (Pair<?, ?>) o;
        return Objects.equals(p.first, first) && Objects.equals(p.second, second);
    }
Checks the two objects for equality by delegating to their respective
{@link Object#equals(Object)} methods.

@param o the {@link Pair} to which this one is to be checked for equality
@return true if the underlying objects of the Pair are both considered
        equal
usbSerialForAndroid/src/test/java/android/util/Pair.java