Code example for Random

Methods: nextFloat

0
  public float estimatePreference(long userID, long itemID) { 
    return randomPref(); 
  } 
   
  private float randomPref() { 
    return minPref + random.nextFloat() * (maxPref - minPref); 
  } 
   
  @Override 
  public void refresh(Collection<Refreshable> alreadyRefreshed) { 
    getDataModel().refresh(alreadyRefreshed); 
  } 
   
}