code: public boolean addProbability(E o, Double p) throws InconsistencyException, ParameterException {
  		if(isValid())
  			return false;
  		Validate.probability(p);
  	
  		if(keys.isEmpty()){
  			keys.add(o);
  			limits.add(p);
  		} else {
  			if((getSum() + p) > 1.0+tolerance){
  				throw new InconsistencyException("Probabilities must sum up to 1 ("+(getSum() + p)+" instead).");
  			}
  			keys.add(o);
  			limits.add(getSum() + p);
  		}
  		
  		isValid = (1.0-getSum()) <= tolerance;
  		probabilities.put(o, p);
  		return true;
  	}
docs: Adds a new element together with its occurrence probability.<br>
  The method checks and sets the validity state of the chooser.
  Once valid, no more probabilities are accepted.
  @param o Element to add.
  @param p Occurrence probability of the given element.
  @throws InconsistencyException Thrown if the sum of all maintained probabilities is greater than 1.