Does it make more sense to move the for loop out of this function completely?  Then you'd only be passing in the `ArrayList<RayMessage>` and it might be clearer in this function what's happening (there's only one seed to deal with).