Package com.transifex.common
Class LocaleData.LocaleStrings
java.lang.Object
com.transifex.common.LocaleData.LocaleStrings
- Enclosing class:
- LocaleData
A class holding some locale's strings. It maps
String keys
to LocaleData.StringInfo objects.-
Constructor Summary
ConstructorsConstructorDescriptionLocaleStrings(int initialCapacity) Creates an empty LocaleStrings object with the specified initial capacity.LocaleStrings(LocaleData.LocaleStrings localeStrings) Creates a new LocaleStrings object by making a copy of the provided one.Creates a LocaleStrings object which uses the providedHashMap. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the string value associated with the provided key, ornullif it isn't found.getMap()Returns the underlying data structure.inthashCode()voidput(String key, LocaleData.StringInfo stringInfo) Associates the specified key with the specifiedLocaleData.StringInfoobject.toString()
-
Constructor Details
-
LocaleStrings
Creates a LocaleStrings object which uses the providedHashMap.The HashMap should map Android resource entry names to
LocaleData.StringInfoobjects like this:{ 'key1' : LocaleString, 'key2' : LocaleString, } -
LocaleStrings
Creates a new LocaleStrings object by making a copy of the provided one. -
LocaleStrings
public LocaleStrings(int initialCapacity) Creates an empty LocaleStrings object with the specified initial capacity.- Parameters:
initialCapacity- The initial capacity. Set to the number of expected strings.
-
-
Method Details
-
put
Associates the specified key with the specifiedLocaleData.StringInfoobject. -
get
Return the string value associated with the provided key, ornullif it isn't found. -
getMap
Returns the underlying data structure.Changes to the returned map, will affect the object.
-
toString
-
equals
-
hashCode
public int hashCode()
-