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
You could write a generic Pair class and use this in an array or list. Yes, you have to write a class, but you can reuse the same class for all types, so you only have to do it once.