Esempio n. 1
0
 /**
  * Set value if smaller than the current value
  *
  * @param t
  * @param count
  */
 public synchronized void setIfSmaller(T t, long count) {
   if (get(t) > count) {
     set(t, count);
   }
 }
Esempio n. 2
0
 /**
  * Set value if larger than the current value
  *
  * @param t
  * @param count
  */
 public synchronized void setIfBigger(T t, long count) {
   if (get(t) < count) {
     set(t, count);
   }
 }