Example usage for com.google.common.collect ImmutableSortedMultiset orderedBy

List of usage examples for com.google.common.collect ImmutableSortedMultiset orderedBy

Introduction

In this page you can find the example usage for com.google.common.collect ImmutableSortedMultiset orderedBy.

Prototype

public static <E> Builder<E> orderedBy(Comparator<E> comparator) 

Source Link

Document

Returns a builder that creates immutable sorted multisets with an explicit comparator.

Usage

From source file:me.yanaga.guava.stream.MoreCollectors.java

public static <T> Collector<T, ?, ImmutableSortedMultiset<T>> toImmutableSortedMultiset(
        Comparator<T> comparator) {
    return toImmutableMultiset(() -> ImmutableSortedMultiset.orderedBy(comparator), CONCURRENT);
}