Class LuxuryPrice


  • public class LuxuryPrice
    extends java.lang.Object
    A class representing the price of a luxury good as they are offered in any region.
    • Constructor Summary

      Constructors 
      Constructor Description
      LuxuryPrice​(ItemType itemType, int price)
      Creates a new LuxuryPrice object with the specified luxury good and price.
    • Constructor Detail

      • LuxuryPrice

        public LuxuryPrice​(ItemType itemType,
                           int price)
        Creates a new LuxuryPrice object with the specified luxury good and price.
    • Method Detail

      • getPrice

        public int getPrice()
        The price of the item type.
      • getItemType

        public ItemType getItemType()
        The item type the price is for.
      • equals

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

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()