Record Class Pair<T,U>

java.lang.Object
java.lang.Record
net.tangly.commons.lang.functional.Pair<T,U>
Type Parameters:
T - left type of the pair
U - right type of the pair

public record Pair<T,U>(T left, U right) extends Record
Defines a typed pair as long as JDK API is not providing the abstraction. Pairs can, for example, be used to return two values from a function. The regular approach is Java is to define an additional record type.