org.openmrs.messagesource
Class PresentationMessageMap

java.lang.Object
  extended by org.openmrs.messagesource.PresentationMessageMap
All Implemented Interfaces:
java.util.Map<java.lang.String,PresentationMessage>

public class PresentationMessageMap
extends java.lang.Object
implements java.util.Map<java.lang.String,PresentationMessage>

A mapped collection of PresentationMessages, all of which are enforced to be in the same locale.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
PresentationMessageMap(java.util.Locale locale)
          Create a new PresentationMessageMap for the given locale.
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,PresentationMessage>> entrySet()
           
 PresentationMessage get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set<java.lang.String> keySet()
           
 PresentationMessage put(java.lang.String key, PresentationMessage value)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends PresentationMessage> t)
          Adds all entries from an input Map which have PresentationMessages from the same locale.
 PresentationMessage remove(java.lang.Object key)
           
 int size()
           
 java.util.Collection<PresentationMessage> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

PresentationMessageMap

public PresentationMessageMap(java.util.Locale locale)
Create a new PresentationMessageMap for the given locale.

Parameters:
locale -
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.clear()

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.containsValue(java.lang.Object)

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,PresentationMessage>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.entrySet()

get

public PresentationMessage get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.isEmpty()

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.keySet()

put

public PresentationMessage put(java.lang.String key,
                               PresentationMessage value)
Specified by:
put in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.put(java.lang.Object, java.lang.Object)
Expected behavior:
should ignore non matching locale messages

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends PresentationMessage> t)
Adds all entries from an input Map which have PresentationMessages from the same locale.

Specified by:
putAll in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.putAll(java.util.Map)
Expected behavior:
filter out non matching locale messages from batch add

remove

public PresentationMessage remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.remove(java.lang.Object)

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.size()

values

public java.util.Collection<PresentationMessage> values()
Specified by:
values in interface java.util.Map<java.lang.String,PresentationMessage>
See Also:
Map.values()

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change