org.jfin.date.accrual
Class Payment
- java.lang.Object
-
- org.jfin.date.accrual.Payment
-
public class Payment extends java.lang.ObjectModels a single atomic payment
-
-
Constructor Summary
Constructors Constructor and Description Payment()Default constructorPayment(double amount, Iso4217Currency currency, java.util.Calendar paymentCalendar)Utility constructorPayment(Payment toCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanareCalendarsSameDate(java.util.Calendar c1, java.util.Calendar c2)Return true if the calendars represent the same date, irrespective of timesPaymentclone()Return a clone of this PaymentbooleanequalsIgnoringAmount(Payment payment)Return true if this Payment is equal to the given payment, ignoring the amount fielddoublegetAmount()Gets the amount of the paymentIso4217CurrencygetCurrency()Gets the currency of the paymentjava.util.CalendargetPaymentCalendar()Gets the date of the paymentvoidsetAmount(double amount)Sets the amount of the paymentvoidsetCurrency(Iso4217Currency currency)Sets the currency of the paymentvoidsetPaymentCalendar(java.util.Calendar paymentCalendar)Sets the date of the payment
-
-
-
Constructor Detail
-
Payment
public Payment()
Default constructor
-
Payment
public Payment(Payment toCopy)
Copy constructor- Parameters:
toCopy- The Payment to copy
-
Payment
public Payment(double amount, Iso4217Currency currency, java.util.Calendar paymentCalendar)Utility constructor- Parameters:
amount- The amount of the paymentcurrency- The currency of the paymentpaymentCalendar- The date of the payment
-
-
Method Detail
-
clone
public Payment clone()
Return a clone of this Payment- Overrides:
clonein classjava.lang.Object- Returns:
- The cloned Payment
-
getAmount
public double getAmount()
Gets the amount of the payment- Returns:
- The amount
-
setAmount
public void setAmount(double amount)
Sets the amount of the payment- Parameters:
amount- The amount
-
getCurrency
public Iso4217Currency getCurrency()
Gets the currency of the payment- Returns:
- The currency
-
setCurrency
public void setCurrency(Iso4217Currency currency)
Sets the currency of the payment- Parameters:
currency- The currency
-
getPaymentCalendar
public java.util.Calendar getPaymentCalendar()
Gets the date of the payment- Returns:
- The date
-
setPaymentCalendar
public void setPaymentCalendar(java.util.Calendar paymentCalendar)
Sets the date of the payment- Parameters:
paymentCalendar- The date
-
equalsIgnoringAmount
public boolean equalsIgnoringAmount(Payment payment)
Return true if this Payment is equal to the given payment, ignoring the amount field- Parameters:
payment- The payment to compare- Returns:
- True if they are equal, otherwise false
-
areCalendarsSameDate
public boolean areCalendarsSameDate(java.util.Calendar c1, java.util.Calendar c2)Return true if the calendars represent the same date, irrespective of times- Parameters:
c1- The first calendar to comparec2- The second calendar to compare- Returns:
- True if they represent the same date, otherwise false
-
-
DataMelt 3.0 © DataMelt by jWork.ORG