com.oanda.fxtrade.api
Interface FXPair

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<FXPair>
All Known Subinterfaces:
Instrument

public interface FXPair
extends java.lang.Cloneable, java.lang.Comparable<FXPair>

FXPair object represents a pair of ISO currency symbols.


Method Summary
 java.lang.Object clone()
          Returns a exact copy of this FXPair.
 int compareTo(FXPair fxpair)
          Performs a lexicographical comparison of two FXPair objects.
 boolean equals(java.lang.Object o)
          Compares this FXPair to another pair.
 java.lang.String getBase()
          Returns the base currency.
 FXPair getInverse()
          Returns a new FXPair object with the base and quote currency reversed.
 java.lang.String getPair()
          Returns the currency pair as a String.
 java.lang.String getQuote()
          Returns the quote currency.
 int hashCode()
          Return the hashcode of this pair
 boolean isHalted()
          Deprecated.  
 void setBase(java.lang.String base)
          Sets the base currency.
 void setPair(java.lang.String pair)
          Sets the currency pair.
 void setQuote(java.lang.String quote)
          Sets the quote currency.
 java.lang.String toString()
           
 

Method Detail

clone

java.lang.Object clone()
Returns a exact copy of this FXPair.


compareTo

int compareTo(FXPair fxpair)
Performs a lexicographical comparison of two FXPair objects.

Specified by:
compareTo in interface java.lang.Comparable<FXPair>
Parameters:
fxpair - the FXPair to be compared
Returns:
the value 0 if the pairs are equal ; a value less than 0 if this pair is lexicographically less than the other ; and a value greater than 0 if this pair is lexicographically greater than the other

equals

boolean equals(java.lang.Object o)
Compares this FXPair to another pair.

Overrides:
equals in class java.lang.Object
Parameters:
o - the FXPair to be compared
Returns:
true if the pairs are equal, false otherwise

getBase

java.lang.String getBase()
Returns the base currency.

Returns:
the base currency

getInverse

FXPair getInverse()
Returns a new FXPair object with the base and quote currency reversed.

Returns:
a new FXPair object with the base and quote currency reversed.

getPair

java.lang.String getPair()
Returns the currency pair as a String.

Returns:
the currency pair as a String.

getQuote

java.lang.String getQuote()
Returns the quote currency.

Returns:
the quote currency

hashCode

int hashCode()
Return the hashcode of this pair

Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode of this pair

isHalted

boolean isHalted()
Deprecated. 

Returns the trading status of this pair.

Returns:
true if trading is halted on this pair, false otherwise

setBase

void setBase(java.lang.String base)
Sets the base currency.

Parameters:
base - the new base currency

setPair

void setPair(java.lang.String pair)
Sets the currency pair.

Parameters:
pair - the new currency pair

setQuote

void setQuote(java.lang.String quote)
Sets the quote currency.

Parameters:
quote - the new quote currency

toString

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


Copyright © 2005 OANDA Corporation. All Rights Reserved.