org.otfeed.command
Enum TimeUnitEnum

java.lang.Object
  extended by java.lang.Enum<TimeUnitEnum>
      extended by org.otfeed.command.TimeUnitEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TimeUnitEnum>

public enum TimeUnitEnum
extends java.lang.Enum<TimeUnitEnum>

Enumerates time units used for aggregation. TICKS is a special "quasi-time" unit, specifying how many ticks to aggregate. For example, asking for DAYS with interval 1 will return trade quotes aggregated during the day; MINUTES with interval 5 will return quotes aggregated on a 5-minute basis; TICKS with interval 10 will return quotes aggregated on a 10-tick basis. See also HistDataCommand.


Enum Constant Summary
DAYS
          Days
HOURS
          Hours
MINUTES
          Minutes
MONTHS
          Months
TICKS
          Ticks
WEEKS
          Weeks
YEARS
          Years
 
Field Summary
 int code
           
 
Method Summary
static TimeUnitEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TimeUnitEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TICKS

public static final TimeUnitEnum TICKS
Ticks


MINUTES

public static final TimeUnitEnum MINUTES
Minutes


HOURS

public static final TimeUnitEnum HOURS
Hours


DAYS

public static final TimeUnitEnum DAYS
Days


WEEKS

public static final TimeUnitEnum WEEKS
Weeks


MONTHS

public static final TimeUnitEnum MONTHS
Months


YEARS

public static final TimeUnitEnum YEARS
Years

Field Detail

code

public final int code
Method Detail

values

public static final TimeUnitEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TimeUnitEnum c : TimeUnitEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TimeUnitEnum valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name


Copyright © 2007 Mike Kroutikov. All Rights Reserved.