AR System Java API

com.bmc.arsys.api
Class CurrencyValue

java.lang.Object
  extended by com.bmc.arsys.api.CurrencyValue
All Implemented Interfaces:
Serializable, Cloneable

public class CurrencyValue
extends Object
implements Cloneable, Serializable

The CurrencyValue class stores the value, code and date when currecy was entered. It also stores a list of converted functional currencies value.

See Also:
Serialized Form

Constructor Summary
CurrencyValue()
          construct an empty Currency Value object
CurrencyValue(BigDecimal value, String currencyCode, Timestamp conversionDate, List<FuncCurrencyInfo> funcCurrencyList)
           
CurrencyValue(String currencyInfoString)
          Construct a CurrencyValue object with the provided string.
CurrencyValue(String currencyInfoString, Locale locale)
           
CurrencyValue(String value, String currencyCode, Timestamp conversionDate, List<FuncCurrencyInfo> funcCurrencyList)
           
 
Method Summary
static String checkDecimalFormat(String value)
          Check if the string is a valid decimal value format
 Object clone()
          Clone implementation that returns an Object with data cloned from self
 boolean equals(Object obj)
          Use this method for checking equality between the current object and the provided one.
 Timestamp getConversionDate()
          Returns conversion date
 String getCurrencyCode()
          Returns currency code.
 List<FuncCurrencyInfo> getFuncCurrencyList()
          Returns a list of functional currencies associated with the field.
 BigDecimal getValue()
          Returns the value of the currency in the format of a Java Big Decimal.
 String getValueString()
          Returns the value of the currency in the format of a string.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 void setConversionDate(long ConversionDate)
          Sets the conversion date
 void setCurrencyCode(String currencyCode)
          Sets currency code
 void setFuncCurrencyList(List<FuncCurrencyInfo> funcCurrencyList)
          Sets a list of functional currencies associated with the field.
 void setValue(BigDecimal value)
          Sets value of currency using a big decimal.
 String toString()
          Returns a string description of the object.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CurrencyValue

public CurrencyValue()
construct an empty Currency Value object


CurrencyValue

public CurrencyValue(String value,
                     String currencyCode,
                     Timestamp conversionDate,
                     List<FuncCurrencyInfo> funcCurrencyList)

CurrencyValue

public CurrencyValue(BigDecimal value,
                     String currencyCode,
                     Timestamp conversionDate,
                     List<FuncCurrencyInfo> funcCurrencyList)

CurrencyValue

public CurrencyValue(String currencyInfoString)
Construct a CurrencyValue object with the provided string. Tbe string is of the format of a currency. For example, 56777.998 USD -or- 56,777.998 -or- 56777.998 USD 182736474


CurrencyValue

public CurrencyValue(String currencyInfoString,
                     Locale locale)
Method Detail

toString

public String toString()
Returns a string description of the object.

Overrides:
toString in class Object

getValue

public BigDecimal getValue()
Returns the value of the currency in the format of a Java Big Decimal.


getValueString

public String getValueString()
Returns the value of the currency in the format of a string.


setValue

public void setValue(BigDecimal value)
Sets value of currency using a big decimal.


getCurrencyCode

public String getCurrencyCode()
Returns currency code.


setCurrencyCode

public void setCurrencyCode(String currencyCode)
Sets currency code


getConversionDate

public Timestamp getConversionDate()
Returns conversion date


setConversionDate

public void setConversionDate(long ConversionDate)
Sets the conversion date


getFuncCurrencyList

public List<FuncCurrencyInfo> getFuncCurrencyList()
Returns a list of functional currencies associated with the field.


setFuncCurrencyList

public void setFuncCurrencyList(List<FuncCurrencyInfo> funcCurrencyList)
Sets a list of functional currencies associated with the field.


equals

public boolean equals(Object obj)
Use this method for checking equality between the current object and the provided one. The result is true only if the argument is not null, is of the same type and represents the same content.

Overrides:
equals in class Object
Parameters:
obj - the object that we are comparing to
Returns:
returns a boolean that tells if the two objects equal

clone

public Object clone()
             throws CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class Object
Returns:
returns the hash code for this instance

checkDecimalFormat

public static String checkDecimalFormat(String value)
                                 throws ARException
Check if the string is a valid decimal value format

Parameters:
value -
Returns:
Throws:
ARException

AR System Java API

? Copyright 2006, 2007 BMC Software, Inc.