Example usage for org.apache.commons.collections15 Bag isEmpty

List of usage examples for org.apache.commons.collections15 Bag isEmpty

Introduction

In this page you can find the example usage for org.apache.commons.collections15 Bag isEmpty.

Prototype

boolean isEmpty();

Source Link

Document

Returns true if this collection contains no elements.

Usage

From source file:com.diversityarrays.kdxplore.vistool.VisToolData.java

static public String createReportText(Bag<String> missingOrBad, Bag<String> suppressed) {

    String fmt = Msg.raw_MSG_VALUE_COLON_VALUE_COUNT();

    List<String> lines = new ArrayList<>();

    if (!missingOrBad.isEmpty()) {
        lines.add(Msg.MSG_SOME_TRAIT_VALUES_NOT_PLOTTED());
        lines.add("Missing or Invalid:");
        appendLines(fmt, missingOrBad, lines);
    }/*from w w w  .j a  va2 s.c o m*/

    if (!suppressed.isEmpty()) {
        if (missingOrBad.isEmpty()) {
            lines.add(Msg.MSG_SOME_TRAIT_VALUES_NOT_PLOTTED());
        }
        lines.add("Suppressed:");
        appendLines(fmt, suppressed, lines);
    }

    return lines.stream().collect(Collectors.joining("\n")); //$NON-NLS-1$
}