⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comparator.java

📁 BOOK:Beginning Algorithms Code Examples
💻 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 + -