Example usage for com.google.common.util.concurrent AtomicLongMap isEmpty

List of usage examples for com.google.common.util.concurrent AtomicLongMap isEmpty

Introduction

In this page you can find the example usage for com.google.common.util.concurrent AtomicLongMap isEmpty.

Prototype

public boolean isEmpty() 

Source Link

Document

Returns true if this map contains no key-value mappings.

Usage

From source file:org.nanoframework.commons.support.logging.AbstractAnalysisLogger.java

protected long total(final AtomicLongMap<String> analysis) {
    if (analysis == null || analysis.isEmpty()) {
        return 0;
    }/*  w w w .  j a v a2 s .com*/

    final AtomicLong total = new AtomicLong(0);
    analysis.asMap().values().forEach(count -> total.addAndGet(count));
    return total.get();
}