I like how Java has a Map where you can define the types of each entry in the map, for example .
What I\'m looking for is a type
Spring has a Pair type in the Data Utils package org.springframework.data.util
Pair pair = Pair.of("Test", 123); System.out.println(pair.getFirst()); System.out.println(pair.getSecond());