public static AmortizeDetail makePaymentDetail(detailType type, int count, Double payment, Double principal, Double interest) {

        switch (type) {
            case SIMPLE:
                return new SimpleAmortizeDetail(count, payment, principal, interest);

            case COMPLEX: //for future
            default:
                throw new UnsupportedOperationException("This PaymentDetail is not yet supported.");
        }
    }