org.xwiki.localization.internal
Class DefaultLocalizedTranslationBundle

java.lang.Object
  extended by org.xwiki.localization.internal.DefaultLocalizedTranslationBundle
All Implemented Interfaces:
LocalizedTranslationBundle

public class DefaultLocalizedTranslationBundle
extends Object
implements LocalizedTranslationBundle

Default implementation of LocalizedTranslationBundle.

Since:
4.3M2

Field Summary
 
Fields inherited from interface org.xwiki.localization.internal.LocalizedTranslationBundle
EMPTY
 
Constructor Summary
DefaultLocalizedTranslationBundle(TranslationBundle bundle, Locale locale)
           
 
Method Summary
 void addTranslation(Translation translation)
           
 TranslationBundle getBundle()
           
 Locale getLocale()
           
 Translation getTranslation(String key)
          Get the translation associated to the passed key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLocalizedTranslationBundle

public DefaultLocalizedTranslationBundle(TranslationBundle bundle,
                                         Locale locale)
Parameters:
bundle - the TranslationBundle containing this LocalizedTranslationBundle
locale - the Locale associated to this bundle.
Method Detail

getBundle

public TranslationBundle getBundle()
Specified by:
getBundle in interface LocalizedTranslationBundle
Returns:
the TranslationBundle containing this LocalizedTranslationBundle

getLocale

public Locale getLocale()
Specified by:
getLocale in interface LocalizedTranslationBundle
Returns:
the Locale associated to this bundle

getTranslation

public Translation getTranslation(String key)
Description copied from interface: LocalizedTranslationBundle
Get the translation associated to the passed key.

Specified by:
getTranslation in interface LocalizedTranslationBundle
Parameters:
key - the translation key
Returns:
the translation

addTranslation

public void addTranslation(Translation translation)
Parameters:
translation - the translation to add to the bundle