class ByteComparator implements Comparator { public int compare(Byte x, Byte y){ return x.byteValue() - y.byteValue(); } public int compare(Object x, Object y){ return this.compare((Byte) x, (Byte) y); } }