|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectExchange
public final class Exchange
Enumeration for all exchanges used by the Yahoo quote system.
The full name of the Exchange is used as an identifier. All other items are attached to the full name.
This type-safe enumeration is unusual in that each element is not
declared or exported individually; rather, the VALUES field includes
all elements in one Collection. Thus, the caller cannot refer to
specific Exchange objects.
| Field Summary | |
|---|---|
static List<Exchange> |
VALUES
Allows caller to iterate over all elements of the enumeration. |
| Method Summary | |
|---|---|
int |
compareTo(Exchange that)
|
String |
getTickerSuffix()
Return the suffix representing the Exchange (excluding dot). |
String |
toString()
Return the full name of this Exchange, suitable for presentation to the end user. |
static Exchange |
valueFrom(String aText)
Convert aText into its corresponding Exchange object, if possible. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final List<Exchange> VALUES
| Method Detail |
|---|
public String getTickerSuffix()
These suffixes are defined by Yahoo, and are appended to tickers in order to provide an exact identification of a traded entity. For example, the Toronto Stock Exchange is assigned the TO suffix. Yahoo will append .TO to all tickers defined by the Toronto Stock Exchange.
In this system, some exchanges (for example, the NYSE) do not have a suffix. In this case, an empty String is returned.
The suffix is not intended for display to the end user; rather, these suffixes should be an internal detail hidden from them.
public String toString()
The suffix is not included in the return value.
toString in class Objectpublic static Exchange valueFrom(String aText)
aText - possibly-null text which may map to an Exchange.
toString() equals aText.
IllegalArgumentException - if a non-null aText
cannot be matched to a known enumeration element.public int compareTo(Exchange that)
compareTo in interface Comparable<Exchange>
|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||