📄 testrecordcomparator.java
字号:
package com.feiei.record;
import javax.microedition.rms.RecordComparator;
public class TestRecordComparator implements RecordComparator {
public TestRecordComparator() {
}
//比较排序
public int compare(byte[] a, byte[] b) {
int f=0;
String str1=new String (a);
String str2=new String (b);
if(str1.compareTo(str2)>0){
f=this.FOLLOWS;
}else if(str1.compareTo(str2)==0){
f=this.EQUIVALENT;
}else if(str1.compareTo(str2)<0){
f=this.PRECEDES;
}
return f;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -