org.otfeed.event
Class OTBookExecute

java.lang.Object
  extended by org.otfeed.event.OTBookExecute
All Implemented Interfaces:
java.lang.Comparable<OTBookExecute>

public final class OTBookExecute
extends java.lang.Object
implements java.lang.Comparable<OTBookExecute>

This is a change to an existing order, and implies that a trade occurred. Look up the existing order using the order reference, and subtract the size from the order. If the order now has no shares, remove the order.


Constructor Summary
OTBookExecute()
          Default constructor.
OTBookExecute(java.util.Date timestamp, java.lang.String reference, int size, int matchNumber)
          Constructor.
 
Method Summary
 int compareTo(OTBookExecute other)
           
 boolean equals(java.lang.Object o)
           
 int getMatchNumber()
           
 java.lang.String getOrderRef()
           
 int getSize()
           
 java.util.Date getTimestamp()
           
 int hashCode()
           
 void setMatchNumber(int matchNumber)
          Sets time of the event.
 void setOrderRef(java.lang.String reference)
          Sets order reference.
 void setSize(int size)
          Sets number of shares.
 void setTimestamp(java.util.Date timestamp)
          Sets time of the event.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OTBookExecute

public OTBookExecute()
Default constructor.


OTBookExecute

public OTBookExecute(java.util.Date timestamp,
                     java.lang.String reference,
                     int size,
                     int matchNumber)
Constructor.

Parameters:
timestamp - Time when the event occurred.
reference - Order reference.
size - Number of shares.
matchNumber - ISLD specific unique match identifier.
Method Detail

getTimestamp

public java.util.Date getTimestamp()
Returns:
Time when the event occurred.

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Sets time of the event.

Parameters:
timestamp - Time when the event occurred.

getOrderRef

public java.lang.String getOrderRef()
Returns:
Order reference.

setOrderRef

public void setOrderRef(java.lang.String reference)
Sets order reference.

Parameters:
reference - Order reference.

getSize

public int getSize()
Returns:
Number of shares.

setSize

public void setSize(int size)
Sets number of shares.

Parameters:
size - Number of shares.

getMatchNumber

public int getMatchNumber()
Returns:
ISLD specific unique match identifier.

setMatchNumber

public void setMatchNumber(int matchNumber)
Sets time of the event.

Parameters:
matchNumber - Time when the event occurred.

toString

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(OTBookExecute other)
Specified by:
compareTo in interface java.lang.Comparable<OTBookExecute>


Copyright © 2007 Mike Kroutikov. All Rights Reserved.