org.universAAL.middleware.util
Class IntAggregator

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

public final class IntAggregator
extends Object

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

Author:
mtazari, Carsten Stockloew
See Also:
RatingAggregator

Constructor Summary
IntAggregator()
          Create a new instance.
 
Method Summary
 IntAggregator addVote(int vote)
          Add a new integer.
 int getAverage()
          Get the average value.
 int getMax()
          Get the maximum value.
 int getMin()
          Get the minimum value.
 int getNumberOfVotes()
          Get the number of integers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntAggregator

public IntAggregator()
Create a new instance.

Method Detail

addVote

public IntAggregator addVote(int vote)
Add a new integer.


getAverage

public int getAverage()
Get the average value.


getMax

public int getMax()
Get the maximum value.


getMin

public int getMin()
Get the minimum value.


getNumberOfVotes

public int getNumberOfVotes()
Get the number of integers.



Copyright © 2014 universAAL Consortium. All Rights Reserved.