Example usage for com.google.common.collect Multisets union

List of usage examples for com.google.common.collect Multisets union

Introduction

In this page you can find the example usage for com.google.common.collect Multisets union.

Prototype

@Beta
public static <E> Multiset<E> union(final Multiset<? extends E> multiset1,
        final Multiset<? extends E> multiset2) 

Source Link

Document

Returns an unmodifiable view of the union of two multisets.

Usage

From source file:org.simmetrics.metrics.Math.java

static <T> Multiset<T> union(Multiset<T> a, Multiset<T> b) {
    // Lager set first for performance improvement.
    // See: MathCaliper
    if (a.size() < b.size()) {
        return Multisets.union(b, a);
    }/*from  w  w  w.  j a  v a 2s.c  om*/

    return Multisets.union(a, b);
}