com.dukascopy.api
Class ReversalAmount

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

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

The class indicates the amount of price movement required to shift a chart to the right. This condition is used on charts that only take into consideration price movement instead of both price and time. Is used for Point and Figures charts for example.


Field Summary
static ReversalAmount FIVE
           
static ReversalAmount FOUR
           
static int MAXIMAL_REVERSAL_AMOUNT
           
static ReversalAmount ONE
           
static ReversalAmount THREE
           
static ReversalAmount TWO
           
 
Method Summary
 int compareTo(ReversalAmount reversalAmount)
          The method compares passed ReversalAmount with the current one if (ReversalAmount == null) or (ReversalAmount.getAmount() < this.getAmount()) Returns 1 if ReversalAmount.getAmount() > this.getAmount() Returns -1 Otherwise Returns 0
static java.util.List<ReversalAmount> createJForexPriceRanges()
          Method creates and returns all available to JForex Reversal Amounts
 boolean equals(java.lang.Object obj)
           
 int getAmount()
           
 int hashCode()
           
 java.lang.String toString()
           
static ReversalAmount valueOf(int amount)
          The method returns appropriate Reversal Amount for the passed amount
static ReversalAmount valueOf(java.lang.String str)
          The method returns appropriate ReversalAmount for the passed String
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ONE

public static final ReversalAmount ONE

TWO

public static final ReversalAmount TWO

THREE

public static final ReversalAmount THREE

FOUR

public static final ReversalAmount FOUR

FIVE

public static final ReversalAmount FIVE

MAXIMAL_REVERSAL_AMOUNT

public static int MAXIMAL_REVERSAL_AMOUNT
Method Detail

valueOf

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

Parameters:
str -
Returns:
Reversal Amount

valueOf

public static ReversalAmount valueOf(int amount)
The method returns appropriate Reversal Amount for the passed amount

Parameters:
str -
Returns:
Reversal Amount

createJForexPriceRanges

public static java.util.List<ReversalAmount> createJForexPriceRanges()
Method creates and returns all available to JForex Reversal Amounts

Returns:
the list of Reversal Amounts

toString

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

getAmount

public int getAmount()

compareTo

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

Specified by:
compareTo in interface java.lang.Comparable<ReversalAmount>
Parameters:
reversalAmount -
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