Class Units.StatItem

  • All Implemented Interfaces:
    java.lang.Comparable<Units.StatItem>
    Enclosing class:
    Units

    public static class Units.StatItem
    extends java.lang.Object
    implements java.lang.Comparable<Units.StatItem>
    a specialized container that behaves much like item
    • Constructor Detail

      • StatItem

        public StatItem​(ItemType type,
                        long amount)
        Creates a new StatItem object.
    • Method Detail

      • setAmount

        public void setAmount​(long amount)
        Parameters:
        amount -
      • getAmount

        public long getAmount()
      • getItemType

        public ItemType getItemType()
      • compareTo

        public int compareTo​(Units.StatItem o)
        compare by type name
        Specified by:
        compareTo in interface java.lang.Comparable<Units.StatItem>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getUnmodifiedAmount

        public long getUnmodifiedAmount()
        Returns the value of unmodifiedAmount.
        Returns:
        Returns unmodifiedAmount.
      • setUnmodifiedAmount

        public void setUnmodifiedAmount​(long unmodifiedAmount)
        Sets the value of unmodifiedAmount.
        Parameters:
        unmodifiedAmount - The value for unmodifiedAmount.
      • getName

        public java.lang.String getName()
        Returns the type name.