|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dxfeed.schedule.SessionFilter
public class SessionFilter
A filter for sessions used by various search methods. This class provides predefined filters for certain Session attributes, although users can create their own filters to suit their needs.
Please note that sessions can be either trading or non-trading, and this distinction can be either based on rules (e.g. weekends) or dictated by special occasions (e.g. holidays). Different filters treat this distinction differently - some accept only trading sessions, some only non-trading, and some ignore type of session altogether.
Field Summary | |
---|---|
static SessionFilter |
AFTER_MARKET
Accepts any session with type SessionType.AFTER_MARKET . |
static SessionFilter |
AFTER_MARKET_TRADING
Deprecated. use AFTER_MARKET filter instead. |
static SessionFilter |
ANY
Accepts any session - useful for pure schedule navigation. |
static SessionFilter |
NO_TRADING
Accepts any session with type SessionType.NO_TRADING . |
static SessionFilter |
NON_TRADING
Accepts non-trading sessions only - those with ( . |
static SessionFilter |
PRE_MARKET
Accepts any session with type SessionType.PRE_MARKET . |
static SessionFilter |
PRE_MARKET_TRADING
Deprecated. use PRE_MARKET filter instead. |
static SessionFilter |
REGULAR
Accepts any session with type SessionType.REGULAR . |
static SessionFilter |
REGULAR_TRADING
Deprecated. use REGULAR filter instead. |
static SessionFilter |
TRADING
Accepts trading sessions only - those with ( . |
Constructor Summary | |
---|---|
SessionFilter(SessionType type,
java.lang.Boolean trading)
Creates filter with specified type and trading flag conditions. |
Method Summary | |
---|---|
boolean |
accept(Session session)
Tests whether or not the specified session is an acceptable result. |
boolean |
equals(java.lang.Object object)
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SessionFilter ANY
public static final SessionFilter TRADING
(Session.isTrading()
== true)
.
public static final SessionFilter NON_TRADING
(Session.isTrading()
== false)
.
public static final SessionFilter NO_TRADING
SessionType.NO_TRADING
.
public static final SessionFilter PRE_MARKET
SessionType.PRE_MARKET
.
public static final SessionFilter REGULAR
SessionType.REGULAR
.
public static final SessionFilter AFTER_MARKET
SessionType.AFTER_MARKET
.
@Deprecated public static final SessionFilter PRE_MARKET_TRADING
PRE_MARKET
filter instead.@Deprecated public static final SessionFilter REGULAR_TRADING
REGULAR
filter instead.@Deprecated public static final SessionFilter AFTER_MARKET_TRADING
AFTER_MARKET
filter instead.Constructor Detail |
---|
public SessionFilter(SessionType type, java.lang.Boolean trading)
Both parameters specify what value corresponding attributes should have.
If some parameter is null
then corresponding attribute is ignored (any value is accepted).
type
- required type, null
if not relevanttrading
- required trading flag, null
if not relevantMethod Detail |
---|
public boolean accept(Session session)
session
- the session to be tested
true
if specified session is acceptedpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |