src/main/java/com/feljtech/istudybucket/business/mapper/PostMapper.java
/**
     * Converts the UserVotePost relation to an upvote count
     * @param postVotes the list of relations
     * @return the streamed count of all relations with a true value of vote
     */
Converts the UserVotePost relation to an upvote count
@param postVotes the list of relations
@return the streamed count of all relations with a true value of vote
Converts the UserVotePost relation to an upvote count @param postVotes the list of relations @return the streamed count of all relations with a true value of vote
default Integer mapDownVotes(List<Vote> postVotes) {
        return Math.toIntExact(
                postVotes.stream()
                        .filter(vote -> VoteType.valueOf(vote.getVote()) == -1)
                        .count()
        );
    }
default Integer mapDownVotes ( List < Vote > postVotes ) { return Math . toIntExact ( postVotes . stream ( ) . filter ( vote -> VoteType . valueOf ( vote . getVote ( ) ) == - 1 ) . count ( ) ) ; }
Converts the UserVotePost relation to an upvote count
 @param postVotes the list of relations
 @return the streamed count of all relations with a true value of vote
Converts the UserVotePost relation to an upvote count @param postVotes the list of relations @return the streamed count of all relations with a true value of vote