public interface Product2<_1,_2>
extends Map.Entry<_1,_2>
The minimal shape of the combination of two potentially distinctly typed values, supporting destructuring via
explicitly named indexing methods, as well as via a combining function.
default<R>Rinto(Fn2<? super _1, ? super _2, ? extends R> fn)
Destructure and apply this product to a function accepting the same number of arguments as this product's
slots. This can be thought of as a kind of dual to uncurrying a function and applying a product to it.
Type Parameters:
R - the return type of the function
Parameters:
fn - the function to apply
Returns:
the result of applying the destructured product to the function