Jump to content

User:Kevin Baas/stat generator code/StatComparator.java

From Wikipedia, the free encyclopedia
import java.util.*;

public class StatComparator implements Comparator {
	public int compare(Object o1, Object o2) {
		Stat s1 = (Stat)o1;
		Stat s2 = (Stat)o2;
		return s1.sort_order > s2.sort_order ? 1 : -1;
	}
	public boolean equals(Object obj) {
		return obj == this;
	}
}