package api.forum.thread;

/**
 * The Class Answer.
 * Stores information about an possible answer selection
 * for a Poll
 *
 * @author Gwindow
 */
public class Answer {
	/**
	 * The answer text
	 */
	private String answer;

	/**
	 * The percent of votes it's gotten
	 */
	private Number percent;

	/**
	 * The ratio of votes it's gotten
	 */
	private Number ratio;

	/**
	 * Get the answer text
	 *
	 * @return the answer text
	 */
	public String getAnswer(){
		return this.answer;
	}

	/**
	 * Get the percent of votes the answers received
	 *
	 * @return the percent of votes received
	 */
	public Number getPercent(){
		return this.percent;
	}

	/**
	 * Get the ratio of votes the answers received
	 *
	 * @return the ratio of votes received
	 */
	public Number getRatio(){
		return this.ratio;
	}

	@Override
	public String toString(){
		return "Answer [getAnswer=" + getAnswer() + ", getPercent=" + getPercent() + ", getRatio=" + getRatio() + "]";
	}
}

@@ -797,16 +797,255 @@
 io;%0A%09%7D%0A%0A
+%09/**%0A%09 * Update the percentage of votes this answer has received%0A%09 *%0A%09 * @param votes votes for this answer%0A%09 * @param total total votes in the poll%0A%09 */%0A%09public void setVotes(int votes, int total)%7B%0A%09%09percent = ((float)votes) / total;%0A%09%7D%0A%0A
 %09@Overri

Add ability to update the votes for an answer in the poll