- Type Parameters:
T - Type of the first component
U - Type of the second component
- All Superinterfaces:
- Product.HasFirst<T>, Product.HasSecond<U>
- Enclosing class:
- Product
public static interface Product.Product2<T,U>
extends Product.HasFirst<T>, Product.HasSecond<U>
A Product2 is a composite object comprising two components.
It's a part of a tuple-like structure with two elements, extending the HasFirst and HasSecond interfaces.
This provides a way to group two related objects together into a single unit.