Here you can find the source of divideForMean(long sum, long count)
private static long divideForMean(long sum, long count)
//package com.java2s; //License from project: Apache License public class Main { /**//w ww .ja va2s . c o m * Divides the sum by the count for an arithmetic mean. If the count is 0, returns -1. */ private static long divideForMean(long sum, long count) { return (count == 0) ? -1 : sum / count; } }