net.datacrow.core.resources
Class DcLanguageResource
java.lang.Object
net.datacrow.core.resources.DcLanguageResource
public class DcLanguageResource
- extends java.lang.Object
Represents the resources for a language (labels and messages).
- Author:
- Robert Jan van der Waals
Field Summary |
static java.lang.String |
suffix
|
Method Summary |
java.lang.String |
get(java.lang.String key)
|
java.util.Map<java.lang.String,java.lang.String> |
getResourcesMap()
|
void |
merge(DcLanguageResource resource)
Adds the values and keys from the provided map to the existing resources
(if these do not yet exist). |
void |
put(java.lang.String key,
java.lang.String value)
Updates or inserts the value for the given key. |
void |
save()
Saves the resources to file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
suffix
public static java.lang.String suffix
DcLanguageResource
public DcLanguageResource(java.lang.String language)
getResourcesMap
public java.util.Map<java.lang.String,java.lang.String> getResourcesMap()
get
public java.lang.String get(java.lang.String key)
put
public void put(java.lang.String key,
java.lang.String value)
- Updates or inserts the value for the given key.
- Parameters:
key
- value
-
merge
public void merge(DcLanguageResource resource)
- Adds the values and keys from the provided map to the existing resources
(if these do not yet exist).
- Parameters:
m
- Map to load the information from.
save
public void save()
- Saves the resources to file.