com.dxfeed.event.candle
Class CandleSymbol

java.lang.Object
  extended by com.dxfeed.event.candle.CandleSymbol
All Implemented Interfaces:
Serializable

public class CandleSymbol
extends Object
implements Serializable

Symbol that should be used with DXFeedSubscription class to subscribe for Candle events.

See Also:
Serialized Form

Method Summary
 boolean equals(Object o)
          Indicates whether this symbol is the same as another one.
 CandleAlignment getAlignment()
          Returns alignment attribute of this symbol.
 String getBaseSymbol()
          Returns base market symbol without attributes.
 CandleExchange getExchange()
          Returns exchange attribute of this symbol.
 CandlePeriod getPeriod()
          Returns aggregation period of this symbol.
 CandlePrice getPrice()
          Returns price type attribute of this symbol.
 CandleSession getSession()
          Returns session attribute of this symbol.
 int hashCode()
          Returns hash code of this symbol.
 String toString()
          Returns string representation of this symbol.
static CandleSymbol valueOf(String symbol)
          Converts the given string symbol into the candle symbol object.
static CandleSymbol valueOf(String symbol, CandleSymbolAttribute<?> attribute)
          Converts the given string symbol into the candle symbol object with the specified attribute set.
static CandleSymbol valueOf(String symbol, CandleSymbolAttribute<?> attribute, CandleSymbolAttribute<?>... attributes)
          Converts the given string symbol into the candle symbol object with the specified attributes set.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getBaseSymbol

public String getBaseSymbol()
Returns base market symbol without attributes.

Returns:
base market symbol without attributes.

getExchange

public CandleExchange getExchange()
Returns exchange attribute of this symbol.

Returns:
exchange attribute of this symbol.

getPrice

public CandlePrice getPrice()
Returns price type attribute of this symbol.

Returns:
price type attribute of this symbol.

getSession

public CandleSession getSession()
Returns session attribute of this symbol.

Returns:
session attribute of this symbol.

getPeriod

public CandlePeriod getPeriod()
Returns aggregation period of this symbol.

Returns:
aggregation period of this symbol.

getAlignment

public CandleAlignment getAlignment()
Returns alignment attribute of this symbol.

Returns:
alignment attribute of this symbol.

toString

public String toString()
Returns string representation of this symbol. The string representation can be transformed back into symbol object using valueOf(String) method.

Overrides:
toString in class Object
Returns:
string representation of this symbol.

equals

public boolean equals(Object o)
Indicates whether this symbol is the same as another one.

Overrides:
equals in class Object
Returns:
true if this symbol is the same as another one.

hashCode

public int hashCode()
Returns hash code of this symbol.

Overrides:
hashCode in class Object
Returns:
hash code of this symbol.

valueOf

public static CandleSymbol valueOf(String symbol)
Converts the given string symbol into the candle symbol object.

Parameters:
symbol - the string symbol.
Returns:
the candle symbol object.
Throws:
IllegalArgumentException - if the string does not represent a valid symbol.

valueOf

public static CandleSymbol valueOf(String symbol,
                                   CandleSymbolAttribute<?> attribute)
Converts the given string symbol into the candle symbol object with the specified attribute set.

Parameters:
symbol - the string symbol.
attribute - the attribute to set.
Returns:
the candle symbol object.
Throws:
IllegalArgumentException - if the string does not represent a valid symbol.

valueOf

public static CandleSymbol valueOf(String symbol,
                                   CandleSymbolAttribute<?> attribute,
                                   CandleSymbolAttribute<?>... attributes)
Converts the given string symbol into the candle symbol object with the specified attributes set.

Parameters:
symbol - the string symbol.
attribute - the attribute to set.
attributes - more attributes to set.
Returns:
the candle symbol object.
Throws:
IllegalArgumentException - if the string does not represent a valid symbol.


Copyright © 2013 Devexperts. All Rights Reserved.