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/UnbalancedTallyException.java

21 lines
784 B

package fr.mieuxvoter.mj;
/**
* Raised when the provided tally does not hold the same amount of judgments for each proposal, and
* normalization is required.
*/
class UnbalancedTallyException extends InvalidTallyException {
private static final long serialVersionUID = 5041093000505081735L;
@Override
public String getMessage() {
return ("The provided tally is unbalanced, as some proposals received more judgments than"
+ " others. \n"
+ "You need to set a strategy for balancing tallies. To that effect, \n"
+ "you may use StaticDefaultTally, MedianDefaultTally, or NormalizedTally"
+ " instead of Tally. \n"
+ (null == super.getMessage() ? "" : super.getMessage()));
}
}