int (MyFontItem item1, MyFontItem item2) { if (item1 instanceof MyNoFontItem) return -1; if (item2 instanceof MyNoFontItem) return 1; if (item1.myIsMonospaced && !item2.myIsMonospaced) return -1; if (!item1.myIsMonospaced && item2.myIsMonospaced) return 1; return item1.myFamilyName.compareTo(item2.myFamilyName); }