ImmutableSortedSet<E>.<E>orderedBy(Comparator<E> comparator) Method

Definition

Returns a builder that creates immutable sorted sets with an explicit comparator. If the comparator has a more general type than the set being generated, such as creating a SortedSet with a Comparator, use the ImmutableSortedSet.Builder<E> constructor instead.

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

Parameters

comparator
java.util.Comparator<E>

Returns

Builder<E>

Applies to