pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.configuration
Class LocaleMappedConfiguration<V>

java.lang.Object
  extended by org.torweg.pulse.configuration.LocaleMappedConfiguration<V>
Type Parameters:
V - the type of the value (has to be "JAXB-able")
All Implemented Interfaces:
java.io.Serializable

public class LocaleMappedConfiguration<V>
extends java.lang.Object
implements java.io.Serializable

Provides Locale-based mapping for configurations.

Version:
$Revision: 1387 $
Author:
Christian Schatt, Daniel Dietz
See Also:
Serialized Form

Nested Class Summary
static class LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>
          The LocaleMappedConfigurationEntry as used by LocaleMappedConfiguration.
 
Constructor Summary
protected LocaleMappedConfiguration()
          The default constructor.
  LocaleMappedConfiguration(java.util.Collection<? extends LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> e)
          The constructor that sets the LocaleMappedConfigurationEntry s.
 
Method Summary
 V get(java.util.Locale l)
          Returns the value of the LocaleMappedConfigurationEntry with the given Locale, or null.
 java.util.Collection<LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> getMappings()
          Returns an unmodifiable Collection of the LocaleMappedConfigurationEntrys.
protected  void set(java.util.Locale l, V v)
          Either sets the value of the LocaleMappedConfigurationEntry with the given Locale to the given value, or adds a new LocaleMappedConfigurationEntry with the given Locale and value.
protected  void setMappings(java.util.Collection<? extends LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> e)
          Sets the LocaleMappedConfigurationEntrys.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleMappedConfiguration

protected LocaleMappedConfiguration()
The default constructor.


LocaleMappedConfiguration

public LocaleMappedConfiguration(java.util.Collection<? extends LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> e)
The constructor that sets the LocaleMappedConfigurationEntry s.

Parameters:
e - the LocaleMappedConfigurationEntrys to set.
Method Detail

getMappings

public final java.util.Collection<LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> getMappings()
Returns an unmodifiable Collection of the LocaleMappedConfigurationEntrys.

Returns:
an unmodifiable Collection of the LocaleMappedConfigurationEntrys.

setMappings

protected final void setMappings(java.util.Collection<? extends LocaleMappedConfiguration.LocaleMappedConfigurationEntry<V>> e)
Sets the LocaleMappedConfigurationEntrys.

Parameters:
e - the LocaleMappedConfigurationEntrys to set.

get

public final V get(java.util.Locale l)
Returns the value of the LocaleMappedConfigurationEntry with the given Locale, or null.

Parameters:
l - the Locale
Returns:
the value, or null

set

protected final void set(java.util.Locale l, V v)
Either sets the value of the LocaleMappedConfigurationEntry with the given Locale to the given value, or adds a new LocaleMappedConfigurationEntry with the given Locale and value.

Parameters:
l - the Locale
v - the value