use of com.google.gerrit.server.util.LabelVote in project gerrit by GerritCodeReview.
the class CommentSender method getLabelVoteSoyData.
private List<Map<String, Object>> getLabelVoteSoyData(List<LabelVote> votes) {
List<Map<String, Object>> result = new ArrayList<>();
for (LabelVote vote : votes) {
Map<String, Object> data = new HashMap<>();
data.put("label", vote.label());
// Soy needs the short to be cast as an int for it to get converted to the
// correct tamplate type.
data.put("value", (int) vote.value());
result.add(data);
}
return result;
}
Aggregations