again though I'm confused by your use of List. Does this need to be ordered? Or can it be something like:

Map<StateId, Set<StateId>> ?