You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
majority-judgment-library-java/src/main/java/fr/mieuxvoter/mj/ProposalTallyInterface.java

38 lines
919 B

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