|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<CandleType>
com.dxfeed.event.candle.CandleType
public enum CandleType
Type of the candle aggregation period constitutes CandlePeriod
type together
its actual value
.
Enum Constant Summary | |
---|---|
DAY
Certain number of days. |
|
HOUR
Certain number of hours. |
|
MINUTE
Certain number of minutes. |
|
MONTH
Certain number of months. |
|
OPTEXP
Certain number of option expirations. |
|
PRICE
Certain price change. |
|
SECOND
Certain number of seconds. |
|
TICK
Certain number of ticks. |
|
VOLUME
Certain volume of trades. |
|
WEEK
Certain number of weeks. |
|
YEAR
Certain number of years. |
Method Summary | |
---|---|
long |
getPeriodIntervalMillis()
Returns candle type period in milliseconds as closely as possible. |
static CandleType |
parse(String s)
Parses string representation of candle type into object. |
String |
toString()
Returns string representation of this candle type. |
static CandleType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static CandleType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final CandleType TICK
public static final CandleType SECOND
public static final CandleType MINUTE
public static final CandleType HOUR
public static final CandleType DAY
public static final CandleType WEEK
public static final CandleType MONTH
public static final CandleType OPTEXP
public static final CandleType YEAR
public static final CandleType VOLUME
public static final CandleType PRICE
Method Detail |
---|
public static CandleType[] values()
for (CandleType c : CandleType.values()) System.out.println(c);
public static CandleType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic long getPeriodIntervalMillis()
SECOND
and
DAY
span a specific number of milliseconds.
MONTH
, OPTEXP
and YEAR
are approximate. Candle type period of
TICK
, VOLUME
, and PRICE
is not defined and this method returns 0
.
public String toString()
name
. For example,
TICK
is represented as "t"
, while MONTH
is represented as
"mo"
to distinguish it from MINUTE
that is represented as "m"
.
toString
in class Enum<CandleType>
public static CandleType parse(String s)
Enum.name()
can be parsed
(including the one that was returned by toString()
)
and case is ignored for parsing.
s
- string representation of candle type.
IllegalArgumentException
- if the string representation is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |