Search in sources :

Example 1 with WeaponTypeComparator

use of delta.games.lotro.lore.items.comparators.WeaponTypeComparator 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);
    }
}
Also used : ArmourType(delta.games.lotro.lore.items.ArmourType) EquipmentLocationComparator(delta.games.lotro.lore.items.comparators.EquipmentLocationComparator) ArrayList(java.util.ArrayList) ItemQuality(delta.games.lotro.lore.items.ItemQuality) IntegerHolder(delta.common.utils.misc.IntegerHolder) EquipmentLocation(delta.games.lotro.lore.items.EquipmentLocation) ItemQualityComparator(delta.games.lotro.lore.items.comparators.ItemQualityComparator) WeaponType(delta.games.lotro.lore.items.WeaponType) ArmourTypeComparator(delta.games.lotro.lore.items.comparators.ArmourTypeComparator) WeaponTypeComparator(delta.games.lotro.lore.items.comparators.WeaponTypeComparator)

Example 2 with WeaponTypeComparator

use of delta.games.lotro.lore.items.comparators.WeaponTypeComparator in project lotro-companion by dmorcellet.

the class ItemFilterConfiguration method getWeaponTypes.

/**
 * Get the selected weapon types.
 * @return a possibly empty but not <code>null</code> list of sorted weapon types.
 */
public List<WeaponType> getWeaponTypes() {
    List<WeaponType> weaponTypes = new ArrayList<WeaponType>();
    weaponTypes.addAll(_weaponTypes);
    Collections.sort(weaponTypes, new WeaponTypeComparator());
    return weaponTypes;
}
Also used : WeaponType(delta.games.lotro.lore.items.WeaponType) ArrayList(java.util.ArrayList) WeaponTypeComparator(delta.games.lotro.lore.items.comparators.WeaponTypeComparator)

Aggregations

WeaponType (delta.games.lotro.lore.items.WeaponType)2 WeaponTypeComparator (delta.games.lotro.lore.items.comparators.WeaponTypeComparator)2 ArrayList (java.util.ArrayList)2 IntegerHolder (delta.common.utils.misc.IntegerHolder)1 ArmourType (delta.games.lotro.lore.items.ArmourType)1 EquipmentLocation (delta.games.lotro.lore.items.EquipmentLocation)1 ItemQuality (delta.games.lotro.lore.items.ItemQuality)1 ArmourTypeComparator (delta.games.lotro.lore.items.comparators.ArmourTypeComparator)1 EquipmentLocationComparator (delta.games.lotro.lore.items.comparators.EquipmentLocationComparator)1 ItemQualityComparator (delta.games.lotro.lore.items.comparators.ItemQualityComparator)1