Weighted probability generator for Android written in Java