class CartManager {

    @Nullable
    public Long getTotalPrice() {
        if (mCachedTotalPrice != null) {
            return mCachedTotalPrice;
        }

        // Regular, Shipping, and Tax
        Long[] sectionPrices = new Long[3];
        sectionPrices[0] = calculateRegularItemTotal();
        sectionPrices[1] = calculateShippingItemTotal();
        sectionPrices[2] = calculateTax();

        Long totalPrice = null;
        for (int i = 0 ; i < sectionPrices.length; i++) {
            if (sectionPrices[i] == null) {
                return null;
            }

            if (totalPrice == null) {
                totalPrice = sectionPrices[i];
            } else {
                totalPrice += sectionPrices[i];
            }
        }

        // There is no need to repeat this calculation until items are added or removed.
        mCachedTotalPrice = totalPrice;
        return totalPrice;
    }

    public  CartManager();
    public  CartManager(String currencyCode);
    public  CartManager(@NonNull Cart oldCart);
    public  CartManager(@NonNull Cart oldCart, boolean shouldKeepShipping, boolean shouldKeepTax);

}