com.mytrendtimer.trendtimer
Class Operation

java.lang.Object
  extended by com.mytrendtimer.trendtimer.Operation

public class Operation
extends java.lang.Object

Represent the buy/sell operations created.

Version:
v0.99.73
Author:
FRM

Constructor Summary
Operation(java.util.Date dateArg, int quantityArg, float costPriceArg, float deltaOpPercArg, int deltaOpDaysArg)
          Main constructor used to instanciate the buy/sell operations generated.
 
Method Summary
 float getCostPrice()
          Getter getCostPrice
 java.util.Date getDate()
          Getter getDate
 int getDeltaOpDays()
          Getter getDeltaOpDays
 float getDeltaOpPerc()
          Getter getDeltaOpPerc
 int getQuantity()
          Getter getQuantity
 java.lang.String toCSV()
          Display operation objects in comma separated format.
 java.lang.String toString()
          Display operation objects
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Operation

public Operation(java.util.Date dateArg,
                 int quantityArg,
                 float costPriceArg,
                 float deltaOpPercArg,
                 int deltaOpDaysArg)
Main constructor used to instanciate the buy/sell operations generated.

Parameters:
dateArg - Date of the generated operation
quantityArg - 1 is for buy operations, -1 for sell operations (used for the CSV file generation.. dirty)
costPriceArg - The theoritical price of the generated operation
deltaOpPercArg - The percentage difference (gain or loss) based on the previous operation.
deltaOpDaysArg - The difference in days (datediff like) based on the previous operation.
Method Detail

getCostPrice

public float getCostPrice()
Getter getCostPrice

Returns:
costPrice

getDate

public java.util.Date getDate()
Getter getDate

Returns:
date

getDeltaOpDays

public int getDeltaOpDays()
Getter getDeltaOpDays

Returns:
deltaOpDays

getDeltaOpPerc

public float getDeltaOpPerc()
Getter getDeltaOpPerc

Returns:
deltaOpPerc

getQuantity

public int getQuantity()
Getter getQuantity

Returns:
quantity

toCSV

public java.lang.String toCSV()
Display operation objects in comma separated format. Used to produce the output CSV file.


toString

public java.lang.String toString()
Display operation objects

Overrides:
toString in class java.lang.Object