Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
就像是:
Ordering<Iterable<ImportXmlRecord>> comparator = Ordering.natural().lexicographical().onResultOf();
但是按 ImportXmlRecord 字段排序?
不完全的:
Ordering<Iterable<ImportXmlRecord>> comparator = Ordering.natural() .onResultOf(new Function<ImportXmlRecord, Whatever>() { public Whatever apply(ImportXmlRecord x) { return x.getWhatever(); } }.lexicographical();