com.pkrete.jsip2.variables
Class CurrencyTypeFactory

java.lang.Object
  extended by com.pkrete.jsip2.variables.CurrencyTypeFactory

public class CurrencyTypeFactory
extends Object

This class generates CurrencyType objects based on the currency code. This class implements the Singleton design pattern, which means that only one instance is created at run time.

Author:
Petteri Kivimäki

Method Summary
 CurrencyType getCurrencyType(String code)
          Returns the currency type that matches the given code.
static CurrencyTypeFactory getInstance()
          Returns a reference to the singleton object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CurrencyTypeFactory getInstance()
Returns a reference to the singleton object. The object is created when this method is called for the first time.

Returns:
reference to the singleton object

getCurrencyType

public CurrencyType getCurrencyType(String code)
                             throws InvalidSIP2ResponseValueException
Returns the currency type that matches the given code.

Parameters:
code - currency code
Returns:
currency type that matches the given code
Throws:
InvalidSIP2ResponseValueException


Copyright © 2012-2014. All Rights Reserved.