use of delta.games.lotro.lore.items.comparators.ItemQualityComparator in project lotro-tools by dmorcellet.
the class ItemStatistics method showStatistics.
private void showStatistics() {
// Items
System.out.println("Items: " + _itemsCount);
// - qualities
System.out.println("- by quality:");
List<ItemQuality> itemQualities = new ArrayList<ItemQuality>(_itemsByQuality.keySet());
Collections.sort(itemQualities, new ItemQualityComparator());
for (ItemQuality itemQuality : itemQualities) {
IntegerHolder count = _itemsByQuality.get(itemQuality);
System.out.println("\t" + itemQuality + ": " + count);
}
// - sub-categories
System.out.println("- by sub-category:");
List<String> itemSubCategories = new ArrayList<String>(_itemsBySubCategory.keySet());
Collections.sort(itemSubCategories);
for (String itemSubCategory : itemSubCategories) {
IntegerHolder count = _itemsBySubCategory.get(itemSubCategory);
System.out.println("\t" + itemSubCategory + ": " + count);
}
// - slot
System.out.println("- by slot:");
List<EquipmentLocation> locations = new ArrayList<EquipmentLocation>(_itemsBySlot.keySet());
Collections.sort(locations, new EquipmentLocationComparator());
for (EquipmentLocation location : locations) {
IntegerHolder count = _itemsBySlot.get(location);
System.out.println("\t" + location + ": " + count);
List<String> names = _itemNamesBySlot.get(location);
if (location != null) {
Collections.sort(names);
for (String name : names) {
System.out.println("\t\t" + name);
}
}
}
// - scaling rules
System.out.println("- by scaling rules:");
List<String> scalingRules = new ArrayList<String>(_scalingRules.keySet());
Collections.sort(scalingRules);
for (String scalingRule : scalingRules) {
List<String> names = _scalingRules.get(scalingRule);
System.out.println("\t" + scalingRule + ": " + names.size());
if (names.size() < 300) {
Collections.sort(names);
for (String name : names) {
System.out.println("\t\t" + name);
}
}
}
// Armours
System.out.println("Armours: " + _armoursCount);
List<ArmourType> armourTypes = new ArrayList<ArmourType>(_armoursByType.keySet());
Collections.sort(armourTypes, new ArmourTypeComparator());
for (ArmourType armourType : armourTypes) {
IntegerHolder count = _armoursByType.get(armourType);
System.out.println("\t" + armourType + ": " + count);
}
// Weapons
System.out.println("Weapons: " + _weaponsCount);
List<WeaponType> weaponTypes = new ArrayList<WeaponType>(_weaponsByType.keySet());
Collections.sort(weaponTypes, new WeaponTypeComparator());
for (WeaponType weaponType : weaponTypes) {
IntegerHolder count = _weaponsByType.get(weaponType);
System.out.println("\t" + weaponType + ": " + count);
}
}
Aggregations