Example usage for org.apache.commons.collections4 Bag containsAll

List of usage examples for org.apache.commons.collections4 Bag containsAll

Introduction

In this page you can find the example usage for org.apache.commons.collections4 Bag containsAll.

Prototype

boolean containsAll(Collection<?> coll);

Source Link

Document

(Violation) Returns true if the bag contains all elements in the given collection, respecting cardinality.

Usage

From source file:uniol.apt.analysis.synthesize.separation.KBoundedSeparation.java

private boolean shouldExplore(Bag<State> r, int k) {
    // Don't continue if no state has cardinality zero, because the result won't be a minimal region
    if (r.containsAll(utility.getTransitionSystem().getNodes()))
        return false;

    // Don't continue if some state has cardinality higher than k
    for (State state : r.uniqueSet())
        if (r.getCount(state) > k)
            return false;

    return true;/*from   w  w  w .ja v  a  2  s  .  c o  m*/
}