org.pf.settings
Interface MultiValueSettings

All Superinterfaces:
ReadOnlySettings, Settings
All Known Implementing Classes:
MultiValueSettingsImpl

public interface MultiValueSettings
extends Settings

This interface defines the methods that are necessary to get and and set settings which might have multiple values.

The inherited methods must work as follows:

Version:
1.0
Author:
Manfred Duchrow

Method Summary
 java.lang.String[] getValuesOf(java.lang.String keyName)
          Returns the values that are registered under the given keyName.
 java.lang.String[] getValuesOf(java.lang.String categoryName, java.lang.String keyName)
          Returns the values of keyName in the specified category.
 void removeValue(java.lang.String keyName, java.lang.String value)
          Removes the given value from the setting with the specified key which is looked up in the default category.
 void removeValue(java.lang.String categoryName, java.lang.String keyName, java.lang.String value)
          Removes the given value from the setting with the specified key in the specified category.
 
Methods inherited from interface org.pf.settings.Settings
removeCategory, removeDefaultCategory, removeKey, removeKey, setValueOf, setValueOf
 
Methods inherited from interface org.pf.settings.ReadOnlySettings
getCategoryNames, getDefaults, getKeyNamesOf, getKeyNamesOfDefaultCategory, getName, getSettingsNameOf, getSettingsNameOf, getValueOf, getValueOf, setDefaults, setName
 

Method Detail

getValuesOf

java.lang.String[] getValuesOf(java.lang.String keyName)
Returns the values that are registered under the given keyName.

Parameters:
keyName - The name of a key inside the default category
Returns:
The associated values or null if the key could not be found

getValuesOf

java.lang.String[] getValuesOf(java.lang.String categoryName,
                               java.lang.String keyName)
Returns the values of keyName in the specified category.

Parameters:
categoryName - The name of the category (null means the default category)
keyName - The name of a key inside the category
Returns:
The associated values or null if either the category or the key could not be found

removeValue

void removeValue(java.lang.String categoryName,
                 java.lang.String keyName,
                 java.lang.String value)
Removes the given value from the setting with the specified key in the specified category. If the categoryName is null or an empty string the key will be looked up in the default category.

Parameters:
categoryName - The name of the category the key resides in
keyName - The name of the key from which to remove the value
value - The value to remove

removeValue

void removeValue(java.lang.String keyName,
                 java.lang.String value)
Removes the given value from the setting with the specified key which is looked up in the default category.

Parameters:
keyName - The name of the key from which to remove the value
value - The value to remove