use of delta.games.lotro.lore.deeds.comparators.DeedNameComparator in project lotro-tools by dmorcellet.
the class DeedsContainer method writeSortedDeeds.
/**
* Write a XML file with a sorted list of deeds.
* @param deeds Deeds to sort and write.
* @param out Output file.
*/
public static void writeSortedDeeds(List<DeedDescription> deeds, File out) {
List<Comparator<DeedDescription>> comparators = new ArrayList<Comparator<DeedDescription>>();
comparators.add(new DeedNameComparator());
comparators.add(new DeedDescriptionComparator());
CompoundComparator<DeedDescription> comparator = new CompoundComparator<DeedDescription>(comparators);
Collections.sort(deeds, comparator);
DeedXMLWriter writer = new DeedXMLWriter();
writer.writeDeeds(out, deeds, EncodingNames.UTF_8);
}
Aggregations