code: public void add(String outcome, double p) {
      outcomes.add(outcome);
      probs.add(new Double(p));
      score += Math.log(p);
    }
docs: Adds an outcome and probability to this sequence.
  @param outcome the outcome to be added.
  @param p the probability associated with this outcome.