Set the number of occurrences of this particular value i @param value the value to be added to the histogram
(X value, int i)
| 367 | * @param value the value to be added to the histogram |
| 368 | */ |
| 369 | public synchronized void set(X value, int i) { |
| 370 | Integer orig = this.get(value); |
| 371 | if (orig != null && orig != i) { |
| 372 | i = (orig > i ? -1 * (orig - i) : i - orig); |
| 373 | } |
| 374 | this._put(value, i); |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Increments the number of occurrences of this particular value i |