/** * Obtains an instance representing an amount where the date is adjustable. * <p> * Whether the payment is pay or receive is determined by the sign of the specified amount. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment of(CurrencyAmount value, AdjustableDate date) { return new AdjustablePayment(value, date); }
@Override public AdjustablePayment build() { return new AdjustablePayment( value, date); }
/** * Obtains an instance representing an amount to be received where the date is adjustable. * <p> * The sign of the amount will be normalized to be positive, indicating receipt. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment ofReceive(CurrencyAmount value, AdjustableDate date) { return new AdjustablePayment(value.positive(), date); }
/** * Obtains an instance representing an amount where the date is fixed. * <p> * Whether the payment is pay or receive is determined by the sign of the specified amount. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment of(CurrencyAmount value, LocalDate date) { return new AdjustablePayment(value, AdjustableDate.of(date)); }
/** * Obtains an instance representing an amount to be paid where the date is adjustable. * <p> * The sign of the amount will be normalized to be negative, indicating a payment. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment ofPay(CurrencyAmount value, AdjustableDate date) { return new AdjustablePayment(value.negative(), date); }
/** * Obtains an instance representing an amount where the date is adjustable. * <p> * Whether the payment is pay or receive is determined by the sign of the specified amount. * * @param currency the currency of the payment * @param amount the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment of(Currency currency, double amount, AdjustableDate date) { return new AdjustablePayment(CurrencyAmount.of(currency, amount), date); }
/** * Obtains an instance representing an amount to be received where the date is fixed. * <p> * The sign of the amount will be normalized to be positive, indicating receipt. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment ofReceive(CurrencyAmount value, LocalDate date) { return new AdjustablePayment(value.positive(), AdjustableDate.of(date)); }
/** * Obtains an instance representing an amount where the date is fixed. * <p> * Whether the payment is pay or receive is determined by the sign of the specified amount. * * @param currency the currency of the payment * @param amount the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment of(Currency currency, double amount, LocalDate date) { return new AdjustablePayment(CurrencyAmount.of(currency, amount), AdjustableDate.of(date)); }
/** * Obtains an instance representing an amount to be paid where the date is fixed. * <p> * The sign of the amount will be normalized to be negative, indicating a payment. * * @param value the amount of the payment * @param date the date that the payment is made * @return the adjustable payment instance */ public static AdjustablePayment ofPay(CurrencyAmount value, LocalDate date) { return new AdjustablePayment(value.negative(), AdjustableDate.of(date)); }