示例#1
0
  public Float getTotal() {
    if (orderLines == null || orderLines.isEmpty()) return 0f;

    Float total = 0f;

    // sum up the quantities
    for (OrderLine orderLine : orderLines) {
      total += (orderLine.getSubTotal());
    }

    return total;
  }