com.dukascopy.api
Class PriceRange

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

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

The class is used for Range Bar and Point&Figures price interval in pips identification


Field Summary
static PriceRange FIVE_PIPS
           
static PriceRange FOUR_PIPS
           
static int MAXIMAL_PIP_COUNT
           
static PriceRange ONE_PIP
           
static PriceRange SIX_PIPS
           
static PriceRange THREE_PIPS
           
static PriceRange TWO_PIPS
           
 
Method Summary
 int compareTo(PriceRange priceRange)
          The method compares passed PriceRange with the current one if (PriceRange == null) or (PriceRange.getPipCount() < this.getPipCount()) Returns 1 if PriceRange.getPipCount() > this.getPipCount() Returns -1 Otherwise Returns 0
static java.util.List<PriceRange> createJForexPriceRanges()
          Method creates and returns all available to JForex Price Ranges.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Method returns the price range name
 int getPipCount()
          Method returns pip count of price range
 int hashCode()
           
 java.lang.String toString()
           
static PriceRange valueOf(int pipCount)
          The method returns appropriate PriceRange for the passed pip count
static PriceRange valueOf(java.lang.String str)
          The method returns appropriate PriceRange for the passed String
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ONE_PIP

public static final PriceRange ONE_PIP

TWO_PIPS

public static final PriceRange TWO_PIPS

THREE_PIPS

public static final PriceRange THREE_PIPS

FOUR_PIPS

public static final PriceRange FOUR_PIPS

FIVE_PIPS

public static final PriceRange FIVE_PIPS

SIX_PIPS

public static final PriceRange SIX_PIPS

MAXIMAL_PIP_COUNT

public static int MAXIMAL_PIP_COUNT
Method Detail

getName

public java.lang.String getName()
Method returns the price range name

Returns:
the name of price range

getPipCount

public int getPipCount()
Method returns pip count of price range

Returns:
pip count

valueOf

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

Parameters:
str -
Returns:
price range

valueOf

public static PriceRange valueOf(int pipCount)
The method returns appropriate PriceRange for the passed pip count

Parameters:
str -
Returns:
price range

createJForexPriceRanges

public static java.util.List<PriceRange> createJForexPriceRanges()
Method creates and returns all available to JForex Price Ranges.

Returns:
the list of price ranges

toString

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

compareTo

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

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

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