Java doesn't have the concept of tuples, so no! But there can be a workaround by converting the stream to a Map
(which has a lot of limitations and consequences):
(Stream of T instances)
.collect(Collectors.toMap(t -> t.a, t -> t.b))
.forEach((a, b) -> {});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…