Package jadex.bdi.examples.shop
Class ItemInfo
- java.lang.Object
- 
- jadex.bdi.examples.shop.ItemInfo
 
- 
 public class ItemInfo extends java.lang.ObjectItem info stores details about items. Note: two item infos are condidered equal if there name is equal. This allows fetching old item infos and updating them by item name.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if an object is equal to this one.java.lang.StringgetName()Get the name.doublegetPrice()Get the price.intgetQuantity()Get the quantity.inthashCode()Get the hashcode.voidsetName(java.lang.String name)Set the name.voidsetPrice(double price)Set the price.voidsetQuantity(int quantity)Set the quantity.
 
- 
- 
- 
Method Detail- 
getNamepublic java.lang.String getName() Get the name.- Returns:
- the name.
 
 - 
setNamepublic void setName(java.lang.String name) Set the name.- Parameters:
- name- The name to set.
 
 - 
getPricepublic double getPrice() Get the price.- Returns:
- the price.
 
 - 
setPricepublic void setPrice(double price) Set the price.- Parameters:
- price- The price to set.
 
 - 
getQuantitypublic int getQuantity() Get the quantity.- Returns:
- The quantity.
 
 - 
setQuantitypublic void setQuantity(int quantity) Set the quantity.- Parameters:
- quantity- The quantity to set.
 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
- Returns:
- The hashcode.
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if an object is equal to this one.- Overrides:
- equalsin class- java.lang.Object
- Parameters:
- obj- The object to test.
- Returns:
- True, if both are equal.
 
 
- 
 
-