Package jadex.bdi.shop
Class ItemInfo
java.lang.Object
jadex.bdi.shop.ItemInfo
Item info stores details about items.
Note: two item infos are considered equal if there name is equal.
This allows fetching old item infos and updating them by item name.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Test if an object is equal to this one.getName()
Get the name.double
getPrice()
Get the price.int
Get the quantity.int
hashCode()
Get the hashcode.void
Set the name.void
setPrice
(double price) Set the price.void
setQuantity
(int quantity) Set the quantity.
-
Field Details
-
name
The name . -
price
protected double priceThe price. -
quantity
protected int quantityThe quantity.
-
-
Constructor Details
-
ItemInfo
public ItemInfo()Create a new item info. -
ItemInfo
Create a new item info. -
ItemInfo
Create a new item info.
-
-
Method Details
-
getName
Get the name.- Returns:
- the name.
-
setName
Set the name.- Parameters:
name
- The name to set.
-
getPrice
public double getPrice()Get the price.- Returns:
- the price.
-
setPrice
public void setPrice(double price) Set the price.- Parameters:
price
- The price to set.
-
getQuantity
public int getQuantity()Get the quantity.- Returns:
- The quantity.
-
setQuantity
public void setQuantity(int quantity) Set the quantity.- Parameters:
quantity
- The quantity to set.
-
hashCode
public int hashCode()Get the hashcode. -
equals
Test if an object is equal to this one.
-