/** * 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); } }
/** * 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); } }