sumCount方法
final long sumCount() { CounterCell[] as = counterCells; CounterCell a; //获取baseCount的值 long sum = baseCount; if (as != null) { //遍历CounterCell数组,累加每一个CounterCell的value值 for (int i = 0; i < as.length; ++i) { if ((a = as[i]) != null) sum += a.value; } } return sum; }注意:这个方法并不是线程安全的