class Money implements Serializable, Comparable<Object> {

    public Money[] allocate(int targets) {
        Money[] results = new Money[targets];

        Money lowResult = newMoneyWithSameCurrency(this.cent / targets);
        Money highResult = newMoneyWithSameCurrency(lowResult.cent + 1);

        int remainder = (int) this.cent % targets;

        for (int i = 0; i < remainder; i++) {
            results[i] = highResult;
        }

        for (int i = remainder; i < targets; i++) {
            results[i] = lowResult;
        }

        return results;
    }

    public  Money();
    public  Money(long yuan, int cent);
    public  Money(long yuan, int cent, Currency currency);
    public  Money(String amount);
    public  Money(String amount, Currency currency);
    public  Money(String amount, Currency currency, int roundingMode);
    public  Money(double amount);
    public  Money(double amount, Currency currency);
    public  Money(BigDecimal amount);
    public  Money(BigDecimal amount, int roundingMode);
    public  Money(BigDecimal amount, Currency currency);
    public  Money(BigDecimal amount, Currency currency, int roundingMode);

}