BrightSide Workbench Full Report + Source Code
org.turro.financials.cart.CartItemSet Class Reference
Inheritance diagram for org.turro.financials.cart.CartItemSet:
Collaboration diagram for org.turro.financials.cart.CartItemSet:

Public Member Functions

boolean addItem (CartItem cartItem)
 
void removeItem (int order)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file CartItemSet.java.

Member Function Documentation

◆ addItem()

boolean org.turro.financials.cart.CartItemSet.addItem ( CartItem  cartItem)

Definition at line 31 of file CartItemSet.java.

31  {
32  removeGarbage();
33  if(cartItem.isValid()) {
34  add(cartItem);
35  reorder();
36  return true;
37  }
38  return false;
39  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeItem()

void org.turro.financials.cart.CartItemSet.removeItem ( int  order)

Definition at line 41 of file CartItemSet.java.

41  {
42  Iterator<CartItem> it = iterator();
43  while(it.hasNext()) {
44  if(it.next().getOrder() == order) {
45  it.remove();
46  break;
47  }
48  }
49  reorder();
50  }

The documentation for this class was generated from the following file: