public final class PriceRange extends java.lang.Object implements java.lang.Comparable<PriceRange>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
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 |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PriceRange priceRange)
The method compares passed PriceRange with the current one
|
static java.util.List<PriceRange> |
createJForexPriceRanges()
Method creates and returns first 1000 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
|
public static final PriceRange ONE_PIP
public static final PriceRange TWO_PIPS
public static final PriceRange THREE_PIPS
public static final PriceRange FOUR_PIPS
public static final PriceRange FIVE_PIPS
public static final PriceRange SIX_PIPS
public static int MAXIMAL_PIP_COUNT
public java.lang.String getName()
public int getPipCount()
public static PriceRange valueOf(java.lang.String str)
str
- String representationpublic static PriceRange valueOf(int pipCount)
pipCount
- pip count valuepublic static java.util.List<PriceRange> createJForexPriceRanges()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(PriceRange priceRange)
if (PriceRange == null) or (PriceRange.getPipCount() < this.getPipCount()) Returns 1
if PriceRange.getPipCount() > this.getPipCount() Returns -1
Otherwise Returns 0
compareTo
in interface java.lang.Comparable<PriceRange>
priceRange
- PriceRange object to comparepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2023. All rights reserved.