Package org.xwiki.extension.rating
Class DefaultExtensionRating
- java.lang.Object
-
- org.xwiki.extension.rating.DefaultExtensionRating
-
- All Implemented Interfaces:
ExtensionRating
public class DefaultExtensionRating extends Object implements ExtensionRating
Default implementation of ExtensionRating.- Since:
- 6.2M2
- Version:
- $Id: 76dda9fd713c710a2aea5714e09b2ae6082e023a $
-
-
Constructor Summary
Constructors Constructor Description DefaultExtensionRating(int totalVotes, float averageVote, RatableExtensionRepository repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
float
getAverageVote()
RatableExtensionRepository
getRepository()
int
getTotalVotes()
int
hashCode()
-
-
-
Constructor Detail
-
DefaultExtensionRating
public DefaultExtensionRating(int totalVotes, float averageVote, RatableExtensionRepository repository)
- Parameters:
totalVotes
- the total number of votesaverageVote
- the average of all votesrepository
- the repository from which the rating comes from
-
-
Method Detail
-
getTotalVotes
public int getTotalVotes()
- Specified by:
getTotalVotes
in interfaceExtensionRating
- Returns:
- the total number of votes
-
getAverageVote
public float getAverageVote()
- Specified by:
getAverageVote
in interfaceExtensionRating
- Returns:
- the average vote
-
getRepository
public RatableExtensionRepository getRepository()
- Specified by:
getRepository
in interfaceExtensionRating
- Returns:
- the repository from which the rating was fetched
-
-