org.universAAL.middleware.util
Class RatingAggregator

Package class diagram package RatingAggregator
java.lang.Object
  extended by org.universAAL.middleware.util.RatingAggregator

public final class RatingAggregator
extends Object

Utility class to calculate values (like average, minimum) from a consecutive appearance of Rating values.

Author:
mtazari - Saied Tazari, Carsten Stockloew
See Also:
IntAggregator

Constructor Summary
RatingAggregator()
          Create a new instance.
 
Method Summary
 RatingAggregator addRating(Rating r)
          Add a new Rating.
 Rating getAverage()
          Get the average value.
 Rating getMax()
          Get the maximum value.
 Rating getMin()
          Get the minimum value.
 int getNumberOfRatings()
          Get the number of Ratings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatingAggregator

public RatingAggregator()
Create a new instance.

Method Detail

addRating

public RatingAggregator addRating(Rating r)
Add a new Rating.


getAverage

public Rating getAverage()
Get the average value.


getMax

public Rating getMax()
Get the maximum value.


getMin

public Rating getMin()
Get the minimum value.


getNumberOfRatings

public int getNumberOfRatings()
Get the number of Ratings.



Copyright © 2014 universAAL Consortium. All Rights Reserved.