title: Weighted randomness in Java
body: <p>In Java, given <em>n</em> Items, each with weight <em>w</em>, how does one choose a random Item from the collection with a chance equal to <em>w</em>?</p>
  
  <p>Assume each weight is a double from 0.0 to 1.0, and that the weights in the collection sum to 1. Item.getWeight() returns the Item's weight.</p>