We might also contemplate just using Tuple2; if not, then Pair should not be a case class but a “normal” Java class without those weird auto-generated methods.