The Stock class represents the quantity portion of an {@link Order} object.
Stock
{@link Order}
Default constructor for Quick.
Set up defaults. paramquantity the number to stock this(quantity, true);
Set up defaults.
this(quantity, true);
Additional constructor to allow setting of whether or not to keep stock on hand. paramquantity the number to stockparamonHand whether to keep the stock on hand. this.quantity = quantity; this.onHand = onHand;
Additional constructor to allow setting of whether or not to keep stock on hand.
this.quantity = quantity; this.onHand = onHand;
This returns the current status of whether the stock should be kept on hand. returnboolean - whether stock is on hand. return onHand;
This returns the current status of whether the stock should be kept on hand.
boolean
return onHand;
This returns the number ordered of this stock returnint - the quantity ordered. return quantity;
This returns the number ordered of this stock
int
return quantity;
This sets whether or not to keep the ordered stock on hand. paramonHand whether to keep stock on hand. this.onHand = onHand;
This sets whether or not to keep the ordered stock on hand.
this.onHand = onHand;
This sets the number of this stock to order. paramquantity the number to order. this.quantity = quantity;
This sets the number of this stock to order.
this.quantity = quantity;