类 Transaction

java.lang.Object
cn.nkpro.elcube.utils.xirr.Transaction

public class Transaction extends Object
Represents a transaction for the purposes of computing the irregular rate of return.

Note that negative amounts represent deposits into the investment (and so withdrawals from your cash). Positive amounts represent withdrawals from the investment (deposits into cash). Zero amounts are allowed in case your investment is now worthless.

另请参阅:
Xirr
  • 构造器概要

    构造器
    构造器
    说明
    Transaction​(double amount, Long when)
    Construct a Transaction instance with the given amount at the given day.
    Transaction​(double amount, String when)
    Construct a Transaction instance with the given amount at the given day.
    Transaction​(double amount, LocalDate when)
    Construct a Transaction instance with the given amount at the given day.
    Transaction​(double amount, Date when)
    Construct a Transaction instance with the given amount at the given day.
  • 方法概要

    修饰符和类型
    方法
    说明
    double
    The amount transferred in this transaction.
    The day the transaction took place.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • Transaction

      public Transaction(double amount, LocalDate when)
      Construct a Transaction instance with the given amount at the given day.
      参数:
      amount - the amount transferred
      when - the day the transaction took place
    • Transaction

      public Transaction(double amount, Date when)
      Construct a Transaction instance with the given amount at the given day.
      参数:
      amount - the amount transferred
      when - the day the transaction took place
    • Transaction

      public Transaction(double amount, Long when)
      Construct a Transaction instance with the given amount at the given day.
      参数:
      amount - the amount transferred
      when - the second the transaction took place
    • Transaction

      public Transaction(double amount, String when)
      Construct a Transaction instance with the given amount at the given day.
      参数:
      amount - the amount transferred
      when - the day the transaction took place, see LocalDate.parse(CharSequence) for the format
  • 方法详细资料

    • getAmount

      public double getAmount()
      The amount transferred in this transaction.
      返回:
      amount transferred in this transaction
    • getWhen

      public LocalDate getWhen()
      The day the transaction took place.
      返回:
      day the transaction took place