You can use Pair for this.... See Pair<T, U>