com.dxfeed.api.osub
Class TimeSeriesSubscriptionSymbol<T>

java.lang.Object
  extended by com.dxfeed.api.osub.TimeSeriesSubscriptionSymbol<T>
Type Parameters:
T - the type of the event symbol.
All Implemented Interfaces:
Serializable

public class TimeSeriesSubscriptionSymbol<T>
extends Object
implements Serializable

Represents subscription to time-series of events. This is symbol is observed by ObservableSubscriptionChangeListener methods symbolsAdded and symbolsRemoved when time-series subscription is created via DXFeedTimeSeriesSubscription class.

Equality and hash codes

Time-series subscription symbols are compared based on their eventSymbol only. It means, that a set of time-series subscription symbols can contain at most one time-series subscription for each event symbol.

See Also:
Serialized Form

Constructor Summary
TimeSeriesSubscriptionSymbol(T eventSymbol, long fromTime)
          Creates time-series subscription symbol with a specified event symbol and subscription time.
 
Method Summary
 boolean equals(Object o)
          Returns true if other object is TimeSeriesSubscriptionSymbol with the same eventSymbol.
 T getEventSymbol()
          Returns event symbol.
 long getFromTime()
          Returns subscription time.
 int hashCode()
          Returns eventSymbol hash code.
 String toString()
          Returns string representation of this time-series subscription symbol.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeSeriesSubscriptionSymbol

public TimeSeriesSubscriptionSymbol(T eventSymbol,
                                    long fromTime)
Creates time-series subscription symbol with a specified event symbol and subscription time.

Parameters:
eventSymbol - the event symbol.
fromTime - the subscription time.
Throws:
NullPointerException - if eventSymbol is null.
Method Detail

getEventSymbol

public T getEventSymbol()
Returns event symbol.

Returns:
event symbol.

getFromTime

public long getFromTime()
Returns subscription time.

Returns:
subscription time.

equals

public boolean equals(Object o)
Returns true if other object is TimeSeriesSubscriptionSymbol with the same eventSymbol.

Overrides:
equals in class Object
Returns:
result of equality check.

hashCode

public int hashCode()
Returns eventSymbol hash code.

Overrides:
hashCode in class Object
Returns:
eventSymbol hash code.

toString

public String toString()
Returns string representation of this time-series subscription symbol.

Overrides:
toString in class Object
Returns:
string representation of this time-series subscription symbol.


Copyright © 2013 Devexperts. All Rights Reserved.