publicintsize() {long n =sumCount();return ((n <0L) ?0: (n > (long)Integer.MAX_VALUE) ?Integer.MAX_VALUE: (int)n);}finallongsumCount() {CounterCell[] cs = counterCells;long sum = baseCount;if (cs !=null) {for (CounterCell c : cs)if (c !=null) sum +=c.value; }return sum;}/** * A padded cell for distributing counts. Adapted from LongAdder * and Striped64. See their internal docs for explanation. */@jdk.internal.vm.annotation.ContendedstaticfinalclassCounterCell {volatilelong value;CounterCell(long x) { value = x; }}