@Override public int compare(FontSymbolLookup arg0, FontSymbolLookup arg1) { int r = LessCompare.compareBigFirst(arg0.size(), arg1.size(), maxSize2); // better quality goes first if (r == 0) r = LessCompare.compareBigFirst(arg0.g, arg1.g); // bigger items goes first if (r == 0) r = LessCompare.compareBigFirst(arg0.size(), arg1.size()); return r; }
public BiggerFirst(List<FontSymbolLookup> list) { maxSize = 0; for (FontSymbolLookup l : list) { maxSize = Math.max(maxSize, l.size()); } maxSize2 = maxSize / 2; }