📄 pair.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package gaknn.core;/** * * @author Niro */public class Pair implements Comparable{ public Pair(int i,double v){ index=i; value=v; } int index; double value; public int Index(){ return index; } public double Value(){ return value; } public int compareTo(Object pair) throws ClassCastException { if ((((Pair) pair).value) > this.value) return 1; else if ((((Pair) pair).value) == this.value) return 0; else return -1; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -