Class TxnSet

java.lang.Object
com.infinitekind.moneydance.model.TxnSet
All Implemented Interfaces:
java.lang.Iterable<AbstractTxn>

public class TxnSet
extends java.lang.Object
implements java.lang.Iterable<AbstractTxn>
An unsynchronized (unlike Vector) storage for AbstractTxn objects.
  • Constructor Details

  • Method Details

    • removeAll

      public void removeAll​(java.util.Collection<AbstractTxn> c)
      Remove all objects that are in the given collection
      Since:
      build 736
    • removeAllTxns

      public void removeAllTxns()
    • setHoldBalances

      public void setHoldBalances​(boolean trackBalances)
    • copyInto

      public void copyInto​(java.util.List<AbstractTxn> txnList)
    • copyInto

      public void copyInto​(java.util.Set<AbstractTxn> txnList)
    • copyInto

      public void copyInto​(TxnSet txnSet)
    • addAll

      public void addAll​(java.util.Collection<AbstractTxn> txnList)
    • recalcBalances

      public final void recalcBalances​(long startBalance, boolean negateBalances)
    • recalcBalances

      public final void recalcBalances​(long startBalance, boolean negateBalances, boolean reverseOrder)
    • getTxnAt

      public final AbstractTxn getTxnAt​(int i)
    • getTxnByLegacyID

      public AbstractTxn getTxnByLegacyID​(long txnID)
    • getTxnByID

      public AbstractTxn getTxnByID​(java.lang.String uuid)
    • getBalanceAt

      public final long getBalanceAt​(int i)
    • getTxn

      public AbstractTxn getTxn​(int i)
    • getLastTxn

      public AbstractTxn getLastTxn()
    • indexOf

      public final int indexOf​(AbstractTxn txn)
    • addTxn

      public final void addTxn​(AbstractTxn txn)
    • setTxnAt

      public final void setTxnAt​(AbstractTxn txn, int index)
    • insertTxnAt

      public final void insertTxnAt​(AbstractTxn txn, int index)
    • contains

      public final boolean contains​(AbstractTxn txn)
      Returns true if the given transaction is in this TxnSet. Note: this is only available as of build 273.
    • removeTxnAt

      public final void removeTxnAt​(int i)
    • removeTxn

      public final boolean removeTxn​(AbstractTxn txn)
    • swap

      public final void swap​(int index1, int index2)
    • getSize

      public final int getSize()
    • iterator

      public java.util.Iterator<AbstractTxn> iterator()
      Returns an iterator over the transaction in this set, in reverse order. Note that Iterator.remove() is not supported by this iterator.
      Specified by:
      iterator in interface java.lang.Iterable<AbstractTxn>
      Since:
      build 736
    • cloneTxns

      public final TxnSet cloneTxns()
    • toArray

      public final AbstractTxn[] toArray()
      Return a copy of an array with all of the transactions in it. Note: this is only available as of build 273.
    • sortByField

      public void sortByField​(int sortField)
      Sort the transactions in this TxnSet by the given field (defined as ints in AccountUtil)
      Since:
      build 1190
    • sortWithComparator

      public void sortWithComparator​(java.util.Comparator<AbstractTxn> comparator)
      Sort the transactions in this TxnSet using the given comparator. A set of transaction comparators are available in the TxnUtil class.
      Since:
      build 1190