use of delta.games.lotro.stats.traitPoints.comparators.TraitPointIdComparator in project lotro-companion by dmorcellet.
the class TraitPointsRegistryXMLWriter method write.
/**
* Write a trait points registry to the given XML stream.
* @param hd XML output stream.
* @param registry Registry to write.
* @throws Exception If an error occurs.
*/
public void write(TransformerHandler hd, TraitPointsRegistry registry) throws Exception {
AttributesImpl attrs = new AttributesImpl();
hd.startElement("", "", TraitPointsRegistryXMLConstants.TRAIT_POINTS_REGISTRY_TAG, attrs);
List<TraitPoint> points = registry.getAll();
Collections.sort(points, new TraitPointIdComparator());
for (TraitPoint point : points) {
write(hd, point);
}
hd.endElement("", "", TraitPointsRegistryXMLConstants.TRAIT_POINTS_REGISTRY_TAG);
}
Aggregations