Modifier and Type | Class and Description |
---|---|
static class |
Pairs.SortOrder
Sort ordering for
Pair s. |
Modifier and Type | Method and Description |
---|---|
static <C extends Comparable<C>,D> |
orderByFirst(Pairs.SortOrder order) |
static <C,D extends Comparable<D>> |
orderBySecond(Pairs.SortOrder order) |
public static <C extends Comparable<C>,D> Comparator<Pair<C,D>> orderByFirst(Pairs.SortOrder order)
C
- type of first element in Pair
s to be comparedD
- type of second element in Pair
s to be comparedorder
- whether to sort ascending or descending; null
comes lastPair
s by first element as a Comparator
public static <C,D extends Comparable<D>> Comparator<Pair<C,D>> orderBySecond(Pairs.SortOrder order)
C
- type of first element in Pair
s to be comparedD
- type of second element in Pair
s to be comparedorder
- whether to sort ascending or descending; null
comes lastPair
s by second element as a Comparator
Copyright © 2014–2018. All rights reserved.