com.dukascopy.api
Class TickBarSize

java.lang.Object
  extended by com.dukascopy.api.TickBarSize
All Implemented Interfaces:
java.lang.Comparable<TickBarSize>

public final class TickBarSize
extends java.lang.Object
implements java.lang.Comparable<TickBarSize>

The class indicates the number of ticks to be included to one Tick Bar


Field Summary
static TickBarSize FIVE
           
static TickBarSize FOUR
           
static java.util.List<TickBarSize> JFOREX_TRADE_BAR_SIZES
           
static TickBarSize THREE
           
static TickBarSize TWO
           
 
Method Summary
 int compareTo(TickBarSize tickBarSize)
          The method compares passed TickBarSize with the current one if (TickBarSize == null) or (TickBarSize.getSize() < this.getSize()) Returns 1 if TickBarSize.getSize() > this.getSize() Returns -1 Otherwise Returns 0
static java.util.List<TickBarSize> createJForexTickBarSizes()
          Method creates and returns all available to JForex Tick Bar Sizes
 boolean equals(java.lang.Object obj)
           
 int getSize()
           
 int hashCode()
           
 java.lang.String toString()
           
static TickBarSize valueOf(int size)
          The method returns appropriate TickBarSize for the passed amount
static TickBarSize valueOf(java.lang.String str)
          The method returns appropriate TickBarSize for the passed String
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TWO

public static final TickBarSize TWO

THREE

public static final TickBarSize THREE

FOUR

public static final TickBarSize FOUR

FIVE

public static final TickBarSize FIVE

JFOREX_TRADE_BAR_SIZES

public static java.util.List<TickBarSize> JFOREX_TRADE_BAR_SIZES
Method Detail

createJForexTickBarSizes

public static java.util.List<TickBarSize> createJForexTickBarSizes()
Method creates and returns all available to JForex Tick Bar Sizes

Returns:
the list of Tick Bar Sizes

valueOf

public static TickBarSize valueOf(java.lang.String str)
The method returns appropriate TickBarSize for the passed String

Parameters:
str -
Returns:
TickBarSize

valueOf

public static TickBarSize valueOf(int size)
The method returns appropriate TickBarSize for the passed amount

Parameters:
str -
Returns:
TickBarSize

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSize

public int getSize()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(TickBarSize tickBarSize)
The method compares passed TickBarSize with the current one if (TickBarSize == null) or (TickBarSize.getSize() < this.getSize()) Returns 1 if TickBarSize.getSize() > this.getSize() Returns -1 Otherwise Returns 0

Specified by:
compareTo in interface java.lang.Comparable<TickBarSize>
Parameters:
tickBarSize -
Returns: