📄 comparator.java
字号:
package com.wrox.algorithms.sorting;/** * A generice interface for comparing two object for order. * */public interface Comparator { /** * Compares two objects for order. * * @param left The object on the 'left' of the comparison. * @param right The object on the 'right' of the comparison. * @return <0, 0, >0 if left<right, left == right or left>right respectively. * @throws ClassCastException if the type of either object prevents them from being compared. */ public int compare(Object left, Object right) throws ClassCastException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -