|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.apps.md.model.AvailableSharesTracker
public class AvailableSharesTracker
A class that tracks the number of available shares as of a given date, for a particular security. As the date changes, the number of available shares is adjusted for any splits.
Constructor Summary | |
---|---|
AvailableSharesTracker(int date,
long shares)
Constructor to provide the original information, normally the buy transaction but could be a short sale. |
Method Summary | |
---|---|
void |
allot(long sharesAllotted)
Remove shares from the available (typically because they have been sold). |
long |
getAvailableShares()
|
int |
getLastDateInt()
|
void |
updateDate(CurrencyType secCurr,
int asofDate)
Update the date of this tracker, adjusting the number of available shares for any splits that happened between getLastDateInt() and asofDate . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvailableSharesTracker(int date, long shares)
date
- The date to begin tracking the available shares at.shares
- The number of shares to begin tracking with.Method Detail |
---|
public void allot(long sharesAllotted)
sharesAllotted
- The number of shares to remove. Can be negative if a buy to cover a
short sale is being processed, but is typically positive.public long getAvailableShares()
getLastDateInt()
.public int getLastDateInt()
public void updateDate(CurrencyType secCurr, int asofDate)
getLastDateInt()
and asofDate
.
secCurr
- The currency type to use for the splits check.asofDate
- The date to update to. Note that this should always be greater than or equal
to getLastDateInt()
, do not go backwards in time.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |