Enum Positivity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Positivity>

    public enum Positivity
    extends java.lang.Enum<Positivity>
    Positivity represents how positive or negative a stat change is. This is turned into the color shown to the user in the toolip.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BETTER_CAPPED
      The stat change goes over the cap, but does not net 0
      BETTER_SOMECAPPED
      Some stat changes were fully consumed, some were not.
      BETTER_UNCAPPED
      The stat change is fully consumed.
      NO_CHANGE
      There is no change, ie: The stat is already capped.
      WORSE
      The stat is lower than it was before.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Color getColor​(ItemStatConfig config, Positivity positivity)  
      static Positivity valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Positivity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • WORSE

        public static final Positivity WORSE
        The stat is lower than it was before.
      • NO_CHANGE

        public static final Positivity NO_CHANGE
        There is no change, ie: The stat is already capped.
      • BETTER_CAPPED

        public static final Positivity BETTER_CAPPED
        The stat change goes over the cap, but does not net 0
      • BETTER_SOMECAPPED

        public static final Positivity BETTER_SOMECAPPED
        Some stat changes were fully consumed, some were not. This should NOT be returned by a single stat change. This should only be used by a StatChangeCalculator
      • BETTER_UNCAPPED

        public static final Positivity BETTER_UNCAPPED
        The stat change is fully consumed. NB: a boost that hits the cap, but does not go over it is still considered BETTER_UNCAPPED
    • Method Detail

      • values

        public static Positivity[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Positivity c : Positivity.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Positivity valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null