Nominal entropy estimation in java