Class TxnIterator

java.lang.Object
com.infinitekind.moneydance.model.TxnIterator
All Implemented Interfaces:
java.util.Iterator<Txn>

public class TxnIterator
extends java.lang.Object
implements java.util.Iterator<Txn>
A TxnIterator is an iterator that scans both sides of all transactions, treating split transactions as N*2 transactions where N is the number of SplitTxns associated with the ParentTxn. This iterator should be used for all reporting tasks as it scans Txns in their most generic form.
Since:
Moneydance build 745
Author:
sreilly
  • Constructor Summary

    Constructors 
    Constructor Description
    TxnIterator​(TransactionSet txns)
    Construct a TxnIterator that iterates over all SplitTxns as well as their "flip sides".
  • Method Summary

    Modifier and Type Method Description
    boolean hasNext()
    Return whether or not there are any more Txns over which we should iterate.
    Txn next()  
    void remove()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • TxnIterator

      public TxnIterator​(TransactionSet txns)
      Construct a TxnIterator that iterates over all SplitTxns as well as their "flip sides".
  • Method Details

    • hasNext

      public boolean hasNext()
      Return whether or not there are any more Txns over which we should iterate.
      Specified by:
      hasNext in interface java.util.Iterator<Txn>
    • next

      public Txn next()
      Specified by:
      next in interface java.util.Iterator<Txn>
    • remove

      public void remove()
      Specified by:
      remove in interface java.util.Iterator<Txn>