T - 被排序元素类型public class IndexedComparator<T> extends Object implements Comparator<T>
| 构造器和说明 |
|---|
IndexedComparator(boolean atEndIfMiss,
Map<? super T,Integer> map)
构造
|
IndexedComparator(boolean atEndIfMiss,
T... objs)
构造
|
IndexedComparator(T... objs)
构造
|
public IndexedComparator(T... objs)
objs - 参与排序的数组,数组的元素位置决定了对象的排序先后public IndexedComparator(boolean atEndIfMiss,
Map<? super T,Integer> map)
atEndIfMiss - 如果不在列表中是否排在后边map - 参与排序的map,map中的value值大小决定了对象的排序先后public IndexedComparator(boolean atEndIfMiss,
T... objs)
atEndIfMiss - 如果不在列表中是否排在后边objs - 参与排序的数组,数组的元素位置决定了对象的排序先后public int compare(T o1, T o2)
compare 在接口中 Comparator<T>Copyright © 2024. All rights reserved.