pull/14/head
Dominique Merle 3 years ago
parent d542567cb3
commit 4712348583

@ -2,32 +2,36 @@ package fr.mieuxvoter.mj;
import java.math.BigInteger; import java.math.BigInteger;
/**
* Also known as the merit profile of a proposal (aka. candidate),
* this holds the amounts of judgments received per grade.
*/
public interface ProposalTallyInterface { public interface ProposalTallyInterface {
/** /**
* The tallies of each Grade, that is * The tallies of each Grade, that is
* the amount of judgments received for each Grade by the Proposal, * the amount of judgments received for each Grade by the Proposal,
* from "worst" ("most conservative") Grade to "best" Grade. * from "worst" ("most conservative") Grade to "best" Grade.
*/ */
public BigInteger[] getTally(); public BigInteger[] getTally();
/** /**
* Should be the sum of getTally() * Should be the sum of getTally()
* *
* @return The total amount of judgments received by this proposal. * @return The total amount of judgments received by this proposal.
*/ */
public BigInteger getAmountOfJudgments(); public BigInteger getAmountOfJudgments();
/** /**
* Homemade factory to skip the clone() shenanigans. * Homemade factory to skip the clone() shenanigans.
* Used by the score calculus. * Used by the score calculus.
*/ */
public ProposalTallyInterface duplicate(); public ProposalTallyInterface duplicate();
/** /**
* Move judgments that were fromGrade into intoGrade. * Move judgments that were fromGrade into intoGrade.
* Used by the score calculus. * Used by the score calculus.
*/ */
public void moveJudgments(Integer fromGrade, Integer intoGrade); public void moveJudgments(Integer fromGrade, Integer intoGrade);
} }

Loading…
Cancel
Save