Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
package gov.va.med.ewv.util;
import java.util.Comparator;
public enum AdjustmentType implements Comparator<AdjustmentType>{
CO, OA, PR, PI, CR;
/**
* Sort Order: CO < OA < PI < PR < CR < null
* @param o1
* @param o2
* @return
*/
/*
* adj1.compareTo(AdjustmentType adj2); built-in, natural order
*/
// A Comparator function
//
public int compare(AdjustmentType o1, AdjustmentType o2) {
int ret;
if (o1 != null && o2 != null) {
ret = o1.compareTo(o2);
} else if (o1 != null) {
ret = 1; // o1 < null ?? Seems strange
} else { // o1 == null
ret = -1; // null > o2 ?? Seems strange
}
return ret;
}
}