Class CurrencySplit

  • All Implemented Interfaces:
    com.infinitekind.tiksync.SyncableItem

    public final class CurrencySplit
    extends MoneydanceSyncableItem
    Created by sreilly - 03/08/2014 07:46
    • Field Detail

      • SYNCABLE_TYPE_VALUE

        public static final java.lang.String SYNCABLE_TYPE_VALUE
        See Also:
        Constant Field Values
    • Constructor Detail

      • CurrencySplit

        public CurrencySplit​(AccountBook book)
    • Method Detail

      • getSyncItemType

        public final java.lang.String getSyncItemType()
        Description copied from class: MoneydanceSyncableItem
        Subclasses should override this to return a static string identifying their type of object
        Specified by:
        getSyncItemType in interface com.infinitekind.tiksync.SyncableItem
        Overrides:
        getSyncItemType in class MoneydanceSyncableItem
      • itemWasUpdated

        public void itemWasUpdated()
        Description copied from class: MoneydanceSyncableItem
        This is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.
        Overrides:
        itemWasUpdated in class MoneydanceSyncableItem
      • getSplitRatio

        public final double getSplitRatio()
      • getDate

        public final long getDate()
        Deprecated.
        use getDateInt()
      • getDateInt

        public final int getDateInt()
      • getOldShares

        public final int getOldShares()
      • getNewShares

        public final int getNewShares()
      • setDate

        public final void setDate​(long date)
      • setDateInt

        public final void setDateInt​(int date)
      • setSplitRatio

        public final void setSplitRatio​(double newRatio)
      • setSplitRatio

        public final void setSplitRatio​(int oldShares,
                                        int newShares)
      • setOldShares

        public final void setOldShares​(int oldShares)
      • setNewShares

        public final void setNewShares​(int newShares)
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • makeSplit

        public static CurrencySplit makeSplit​(AccountBook book,
                                              CurrencyType currency,
                                              int date,
                                              double splitRatio,
                                              int oldShares,
                                              int newShares)
        Create a stock split with the given ratio (which should match the old/new shares) on the given date