public abstract class Comparators extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Comparator<T> |
orderedBy(List<T> list)
Static method to return a
Comparator ordering members in the
same order as the List . |
public static <T> Comparator<T> orderedBy(List<T> list)
Comparator
ordering members in the
same order as the List
.T
- The type to be ordered.list
- The List
describing the order.Comparator
enforcing the specified order.Copyright © 2015–2020 Allen D. Ball. All rights reserved.