public class ItemInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
The name .
|
protected double |
price
The price.
|
protected int |
quantity
The quantity.
|
Constructor and Description |
---|
ItemInfo()
Create a new item info.
|
ItemInfo(java.lang.String name)
Create a new item info.
|
ItemInfo(java.lang.String name,
double price,
int quantity)
Create a new item info.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Test if an object is equal to this one.
|
java.lang.String |
getName()
Get the name.
|
double |
getPrice()
Get the price.
|
int |
getQuantity()
Get the quantity.
|
int |
hashCode()
Get the hashcode.
|
void |
setName(java.lang.String name)
Set the name.
|
void |
setPrice(double price)
Set the price.
|
void |
setQuantity(int quantity)
Set the quantity.
|
protected java.lang.String name
protected double price
protected int quantity
public ItemInfo()
public ItemInfo(java.lang.String name)
public ItemInfo(java.lang.String name, double price, int quantity)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public double getPrice()
public void setPrice(double price)
price
- The price to set.public int getQuantity()
public void setQuantity(int quantity)
quantity
- The quantity to set.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to test.