org.otfeed.event
Class OTSymbol

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

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

Provides information about the symbol.


Constructor Summary
OTSymbol()
          Default constructor.
OTSymbol(java.lang.String code, java.lang.String company, java.lang.String currency, InstrumentEnum type)
          Constructor.
 
Method Summary
 int compareTo(OTSymbol other)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getCode()
           
 java.lang.String getCompany()
           
 java.lang.String getCurrency()
           
 InstrumentEnum getType()
           
 int hashCode()
           
 void setCode(java.lang.String code)
          Sets code of the symbol.
 void setCompany(java.lang.String company)
          Sets company name.
 void setCurrency(java.lang.String currency)
          Sets currency.
 void setType(InstrumentEnum type)
          Sets instrument type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OTSymbol

public OTSymbol()
Default constructor.


OTSymbol

public OTSymbol(java.lang.String code,
                java.lang.String company,
                java.lang.String currency,
                InstrumentEnum type)
Constructor.

Parameters:
code - String that identifies the equity, option, future, or index.
company - Company name.
currency - Currency.
type - Instrument type.
Method Detail

getCode

public java.lang.String getCode()
Returns:
String that identifies the equity, option, future, or index.

setCode

public void setCode(java.lang.String code)
Sets code of the symbol.

Parameters:
code - String that identifies the equity, option, future, or index.

getCompany

public java.lang.String getCompany()
Returns:
Company name.

setCompany

public void setCompany(java.lang.String company)
Sets company name.

Parameters:
company - Company name.

getCurrency

public java.lang.String getCurrency()
Returns:
The currency for any prices provided in the events for this symbol; in the current system this value is "USD" for United States Dollars.

setCurrency

public void setCurrency(java.lang.String currency)
Sets currency.

Parameters:
currency - Currency.

getType

public InstrumentEnum getType()
Returns:
Instrument type.

setType

public void setType(InstrumentEnum type)
Sets instrument type.

Parameters:
type - Instrument type.

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(OTSymbol other)
Specified by:
compareTo in interface java.lang.Comparable<OTSymbol>


Copyright © 2007 Mike Kroutikov. All Rights Reserved.