Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.cp.rating
Interface RatingAverageCalculator
public interface RatingAverageCalculatorA RatingAverageCalculator can be used in order to calculate the average value for given RatingSpaces or Ratings.
A RatingAverageCalculator may be plugged in using the extension point EXTENSION_POINT_ID. RatingAverageCalculator implementations must provide a 0-argument constructor.
- Since:
- 7.0.0
Field Summary static java.lang.String ATTR_CLASS
name of the class attribute used for instantiationstatic java.lang.String EXTENSION_POINT_ID
Extension point whihc can be used to plug in different rating average calculation strategies
Method Summary double averageFromRatings(IterableListModel<Rating> ratings)
Calculates the average for a given list of Ratingsdouble averageFromRatingSpaces(IterableListModel<RatingSpace> ratingSpaces)
Calculates the average for a given list of RatingSpaces
Field Detail EXTENSION_POINT_ID
static final java.lang.String EXTENSION_POINT_ID
- Extension point whihc can be used to plug in different rating average calculation strategies
- See Also:
- Constant Field Values
ATTR_CLASS
static final java.lang.String ATTR_CLASS
- name of the class attribute used for instantiation
- See Also:
- Constant Field Values
Method Detail averageFromRatingSpaces
double averageFromRatingSpaces(IterableListModel<RatingSpace> ratingSpaces)
- Calculates the average for a given list of RatingSpaces
- Parameters:
- ratingSpaces - The rating spaces serving as calculation base
- Returns:
- An average value according to the implemented calculation algorithm
averageFromRatings
double averageFromRatings(IterableListModel<Rating> ratings)
- Calculates the average for a given list of Ratings
- Parameters:
- ratings - The ratings serving as calculation base
- Returns:
- An average value according to the implemented calculation algorithm
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD