Example usage for com.google.common.collect FluentIterable toSortedList

List of usage examples for com.google.common.collect FluentIterable toSortedList

Introduction

In this page you can find the example usage for com.google.common.collect FluentIterable toSortedList.

Prototype

@CheckReturnValue
public final ImmutableList<E> toSortedList(Comparator<? super E> comparator) 

Source Link

Document

Returns an ImmutableList containing all of the elements from this FluentIterable in the order specified by comparator .

Usage

From source file:com.github.tomakehurst.wiremock.verification.NearMissCalculator.java

private static List<NearMiss> sortAndTruncate(FluentIterable<NearMiss> nearMisses, int originalSize) {
    return nearMisses.toSortedList(NEAR_MISS_ASCENDING_COMPARATOR).subList(0,
            min(NEAR_MISS_COUNT, originalSize));
}