View Javadoc
1   package civitas.common.mix.votemix;
2   
3   import java.util.Arrays;
4   
5   import org.springframework.stereotype.Controller;
6   
7   import civitas.common.EncryptedVote;
8   import jakarta.annotation.Nonnull;
9   
10  @Controller
11  public class AddVoteToVoteMix {
12  	public void apply(@Nonnull final VoteMix that, @Nonnull final EncryptedVote v) {
13  		EncryptedVote[] n = Arrays.copyOf(that.votes, that.votes.length + 1);
14  		n[that.votes.length] = v;
15  		that.votes = n;
16  	}
17  }