net.sf.morph.integration.commons.lang
Class LanguageStrLookup

java.lang.Object
  extended by org.apache.commons.lang.text.StrLookup
      extended by net.sf.morph.integration.commons.lang.LanguageStrLookup

public class LanguageStrLookup
extends org.apache.commons.lang.text.StrLookup

Implement StrLookup using a Morph Language and a source object.

Since:
Morph 1.1
Author:
Matt Benson

Constructor Summary
LanguageStrLookup(java.lang.Object source)
          Create a new LanguageStrLookup.
LanguageStrLookup(java.lang.Object source, DecoratedLanguage language)
          Create a new LanguageStrLookup.
 
Method Summary
 DecoratedLanguage getLanguage()
          Get the language.
 java.lang.String lookup(java.lang.String key)
          Resolve the specified "property".
 void setLanguage(DecoratedLanguage language)
          Set the language.
 
Methods inherited from class org.apache.commons.lang.text.StrLookup
mapLookup, noneLookup, systemPropertiesLookup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageStrLookup

public LanguageStrLookup(java.lang.Object source)
Create a new LanguageStrLookup.

Parameters:
source - Object

LanguageStrLookup

public LanguageStrLookup(java.lang.Object source,
                         DecoratedLanguage language)
Create a new LanguageStrLookup.

Parameters:
source - Object
language - DecoratedLanguage
Method Detail

lookup

public java.lang.String lookup(java.lang.String key)
Resolve the specified "property".

Specified by:
lookup in class org.apache.commons.lang.text.StrLookup
Parameters:
key - String

getLanguage

public DecoratedLanguage getLanguage()
Get the language.

Returns:
the language

setLanguage

public void setLanguage(DecoratedLanguage language)
Set the language.

Parameters:
language - the language to set


Copyright © 2004-2008.