Code example for AtomicInteger

Methods: incrementAndGet

0
        return threads;
    } 
 
    public void onEventBackgroundThread(String event) {
        lastStringEvent = event;
        countStringEvent.incrementAndGet();
        trackEvent(event);
    } 
 
    public void onEventMainThread(Integer event) {
        lastIntegerEvent = event;
        countIntegerEvent.incrementAndGet();
        trackEvent(event);
    } 
 
    public void onEventAsync(IntTestEvent event) {
        countIntTestEvent.incrementAndGet();
        lastIntTestEvent = event;
        trackEvent(event);
    } 
Contextual code suggestions in your IDE  Get Codota for Java