public final static Observable<Integer> averageInteger(Observable<Integer> source) {
        return source.lift(new OperatorAverageInteger<Integer>(MathObservable.<Integer>identity()));
    }
public final static Observable < Integer > averageInteger ( Observable < Integer > source ) { return source . lift ( new OperatorAverageInteger < Integer > ( MathObservable . < Integer > identity ( ) ) ) ; }
Returns an Observable that emits the average of the Integers emitted by the source Observable.
<p>
<img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/average.png" alt="">

@param source
source Observable to compute the average of
@return an Observable that emits a single item: the average of all the Integers emitted by the source
Observable
@throws IllegalArgumentException
if the source Observable emits no items
@see <a href="https://github.com/ReactiveX/RxJava/wiki/Mathematical-and-Aggregate-Operators#wiki-averageinteger-averagelong-averagefloat-and-averagedouble">RxJava Wiki: averageInteger()</a>
@see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.average.aspx">MSDN: Observable.Average</a>