forked from edemo/PDEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCastVote.java
More file actions
27 lines (21 loc) · 756 Bytes
/
CastVote.java
File metadata and controls
27 lines (21 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.rulez.demokracia.pdengine.votecast;
import java.util.ArrayList;
import java.util.List;
import org.rulez.demokracia.pdengine.RandomUtils;
import org.rulez.demokracia.pdengine.choice.RankedChoice;
public class CastVote extends CastVoteEntity implements CastVoteInterface {
private static final long serialVersionUID = 1L;
public CastVote(final String proxyId, final List<RankedChoice> preferences) {
super();
setProxyId(proxyId);
setPreferences(new ArrayList<>(preferences));
setSecretId(RandomUtils.createRandomKey());
}
public CastVote(
final String proxyId, final List<RankedChoice> preferences,
final List<String> assurances
) {
this(proxyId, preferences);
setAssurances(assurances);
}
}