Class BlacksmithEngine.WeaponAvailabilityComparator

  • All Implemented Interfaces:
    java.util.Comparator<EWeapon>
    Enclosing class:
    BlacksmithEngine

    private static class BlacksmithEngine.WeaponAvailabilityComparator
    extends java.lang.Object
    implements java.util.Comparator<EWeapon>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private IArmory armory  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(EWeapon w1, EWeapon w2)  
      private int getAmount​(EWeapon weapon)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • armory

        private final IArmory armory
    • Constructor Detail

      • WeaponAvailabilityComparator

        public WeaponAvailabilityComparator​(IArmory armory)
    • Method Detail

      • compare

        public int compare​(EWeapon w1,
                           EWeapon w2)
        Specified by:
        compare in interface java.util.Comparator<EWeapon>
      • getAmount

        private int getAmount​(EWeapon weapon)