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
ConstructorDescriptionLocaleStrings
(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 TypeMethodDescriptionboolean
Return the string value associated with the provided key, ornull
if it isn't found.getMap()
Returns the underlying data structure.int
hashCode()
void
put
(String key, LocaleData.StringInfo stringInfo) Associates the specified key with the specifiedLocaleData.StringInfo
object.toString()
-
Constructor Details
-
LocaleStrings
Creates a LocaleStrings object which uses the providedHashMap
.The HashMap should map Android resource entry names to
LocaleData.StringInfo
objects 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.StringInfo
object. -
get
Return the string value associated with the provided key, ornull
if 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()
-