Interface Votable

    • Method Detail

      • voteUp

        boolean voteUp​(String userid)
        Upvotes the object.
        Parameters:
        userid - id of voter
        Returns:
        true if successful
      • voteDown

        boolean voteDown​(String userid)
        Downvotes the object.
        Parameters:
        userid - id of voter
        Returns:
        true if successful
      • getVotes

        Integer getVotes()
        Returns the total sum of all votes for this object. For example: (+6) + (-4) = 2
        Returns:
        the total sum of votes
      • setVotes

        void setVotes​(Integer votes)
        Sets the total votes for this object.
        Parameters:
        votes - the number of votes