T - public final class ItemCounter<T> extends Object
| Constructor and Description |
|---|
ItemCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T item,
long delta)
Add delta to the item
|
boolean |
equals(Object o) |
long |
get(T item)
Get current counter for an item item
|
long |
getAndSet(T item,
long value)
Set counter for item and return previous value
|
int |
hashCode() |
Set<T> |
keySet()
Returns a set of all keys in this counter.
|
void |
remove(T item) |
void |
reset()
Reset state of the counter to 0.
|
void |
set(T item,
long value)
Set counter of item to value
|
String |
toString() |
public Set<T> keySet()
public long get(T item)
item - public void set(T item, long value)
item - to set set the value forvalue - a new valuepublic void add(T item, long delta)
item - delta - public void reset()
public long getAndSet(T item, long value)
item - value - public void remove(T item)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.