com.pkrete.jsip2.variables
Class LanguageFactory

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

public class LanguageFactory
extends Object

This class generates Language objects based on the language 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
static LanguageFactory getInstance()
          Returns a reference to the singleton object.
 Language getLanguage(String code)
          Returns a language matching the given language code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LanguageFactory 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

getLanguage

public Language getLanguage(String code)
                     throws InvalidSIP2ResponseValueException
Returns a language matching the given language code.

Parameters:
code - language code
Returns:
language with the given language code
Throws:
InvalidSIP2ResponseValueException


Copyright © 2012-2014. All Rights Reserved.