Package com.yetanalytics.xapi.model
Class LangMap
- java.lang.Object
-
- com.yetanalytics.xapi.model.LangMap
-
public class LangMap extends Object implements IFreeMap<LangTag,String>
Java wrapper object for the xAPI Language Map object. The Language Map is a dictionary where the keys are RFC 5646 Language Tags and the value is a String in the language specified by the tag.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
get(LangTag languageCode)
Retrieve the value for a specific language.String
get(String languageCode)
Retrieve the value for a specific language.Set<LangTag>
getKeys()
Retrieves the full set of RFC 5646 Language Tags contained in the MapMap<LangTag,String>
getMap()
Retrieves the full Language Map in the form of a HashMap<String, String>void
put(LangTag languageCode, String value)
Sets an entry in the Language Mapvoid
put(String languageCode, String value)
Sets an entry in the Language Mapvoid
remove(LangTag languageCode)
Remove an entry from the Language Mapvoid
remove(String languageCode)
Remove an entry from the Language Map
-
-
-
Method Detail
-
put
public void put(String languageCode, String value) throws IllformedLocaleException
Sets an entry in the Language Map- Specified by:
put
in interfaceIFreeMap<LangTag,String>
- Parameters:
languageCode
- the RFC 5646 language tag String of the specified languagevalue
- a string in the language specified by languageCode- Throws:
IllformedLocaleException
-
get
public String get(String languageCode) throws IllformedLocaleException
Retrieve the value for a specific language.- Specified by:
get
in interfaceIFreeMap<LangTag,String>
- Parameters:
languageCode
- RFC 5646 language tag String- Returns:
- The value in the language specified by the tag
- Throws:
IllformedLocaleException
-
remove
public void remove(LangTag languageCode)
Remove an entry from the Language Map
-
remove
public void remove(String languageCode) throws IllformedLocaleException
Remove an entry from the Language Map- Specified by:
remove
in interfaceIFreeMap<LangTag,String>
- Parameters:
languageCode
- RFC 5646 language tag String- Throws:
IllformedLocaleException
-
getKeys
public Set<LangTag> getKeys()
Retrieves the full set of RFC 5646 Language Tags contained in the Map
-
-