public static class RatingsPage.RatingModel extends Object implements IClusterable
Constructor and Description |
---|
RatingsPage.RatingModel() |
Modifier and Type | Method and Description |
---|---|
void |
addRating(int nrOfStars)
Adds the vote from the user to the total of votes, and calculates the rating.
|
Integer |
getNrOfVotes()
Gets the number of cast votes.
|
Double |
getRating()
Gets the rating.
|
int |
getSumOfRatings()
Returns the sum of the ratings.
|
boolean |
isActive(int star)
Returns whether the star should be rendered active.
|
public boolean isActive(int star)
star
- the number of the starpublic Integer getNrOfVotes()
public void addRating(int nrOfStars)
nrOfStars
- the number of stars the user has castpublic Double getRating()
public int getSumOfRatings()
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.