T
- the type of the event symbol.public class TimeSeriesSubscriptionSymbol<T> extends IndexedEventSubscriptionSymbol<T> implements FilteredSubscriptionSymbol
ObservableSubscriptionChangeListener
methods symbolsAdded
and symbolsRemoved
when time-series subscription is created via DXFeedTimeSeriesSubscription
class.
Instances of this class can be used with DXFeedSubscription
to specify subscription
for time series events from a specific time. By default, subscribing to time-series events by
their event symbol object, the subscription is performed to a stream of new events as they happen only.
TimeSeriesEvent
represents a special subtype of IndexedEvent
.
The source identifier of a time-series event is always zero and thus
getSource
method for time-series subscription symbol always returns
DEFAULT
.
FilteredSubscriptionSymbol
.
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.Constructor and Description |
---|
TimeSeriesSubscriptionSymbol(T eventSymbol,
long fromTime)
Creates time-series subscription symbol with a specified event symbol and subscription time.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Returns
true if other object is TimeSeriesSubscriptionSymbol with
the same eventSymbol . |
long |
getFromTime()
Returns subscription time.
|
int |
hashCode()
Returns
eventSymbol hash code. |
String |
toString()
Returns string representation of this time-series subscription symbol.
|
getEventSymbol, getSource
public TimeSeriesSubscriptionSymbol(T eventSymbol, long fromTime)
eventSymbol
- the event symbol.fromTime
- the subscription time.NullPointerException
- if eventSymbol is null
.public final long getFromTime()
public boolean equals(Object o)
true
if other object is TimeSeriesSubscriptionSymbol
with
the same eventSymbol
.equals
in class IndexedEventSubscriptionSymbol<T>
public int hashCode()
eventSymbol
hash code.hashCode
in class IndexedEventSubscriptionSymbol<T>
eventSymbol
hash code.public String toString()
toString
in class IndexedEventSubscriptionSymbol<T>
Copyright © 2002–2023 Devexperts LLC. All rights reserved.