Author: oheger
Date: Thu Oct 16 13:08:59 2008
New Revision: 705345
URL: http://svn.apache.org/viewvc?rev=705345&view=rev
Log:
Minor changes in the generified signature of the getList() method
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/Configuration.java
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java?rev=705345&r1=705344&r2=705345&view=diff
==============================================================================
---
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
(original)
+++
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java
Thu Oct 16 13:08:59 2008
@@ -179,6 +179,7 @@
* @deprecated Use AbstractConfiguration.setDefaultListDelimiter(char)
* instead
*/
+ @Deprecated
public static void setDelimiter(char delimiter)
{
setDefaultListDelimiter(delimiter);
@@ -200,6 +201,7 @@
* @return the default list delimiter
* @deprecated Use AbstractConfiguration.getDefaultListDelimiter() instead
*/
+ @Deprecated
public static char getDelimiter()
{
return getDefaultListDelimiter();
@@ -331,6 +333,7 @@
ConfigurationInterpolator interpol = new ConfigurationInterpolator();
interpol.setDefaultLookup(new StrLookup()
{
+ @Override
public String lookup(String var)
{
Object prop = resolveContainerStore(var);
@@ -493,6 +496,7 @@
* <code>[EMAIL PROTECTED] PropertyConverter}</code>; this method will no
longer be
* called
*/
+ @Deprecated
protected String interpolateHelper(String base, List<?> priorVariables)
{
return base; // just a dummy implementation
@@ -1119,9 +1123,9 @@
* [EMAIL PROTECTED]
* @see #getStringArray(String)
*/
- public List<?> getList(String key)
+ public <T> List<T> getList(String key)
{
- return getList(key, new ArrayList<Object>());
+ return getList(key, new ArrayList<T>());
}
@SuppressWarnings("unchecked")
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/Configuration.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/Configuration.java?rev=705345&r1=705344&r2=705345&view=diff
==============================================================================
---
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/Configuration.java
(original)
+++
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/Configuration.java
Thu Oct 16 13:08:59 2008
@@ -567,12 +567,13 @@
* If the key doesn't map to an existing object an empty List is returned.
*
* @param key The configuration key.
+ * @param <E> the type of the elements in the list
* @return The associated List.
*
* @throws ConversionException is thrown if the key maps to an
* object that is not a List.
*/
- List<?> getList(String key);
+ <E> List<E> getList(String key);
/**
* Get a List of strings associated with the given configuration key.
@@ -581,10 +582,11 @@
*
* @param key The configuration key.
* @param defaultValue The default value.
+ * @param <E> the type of the elements in the list
* @return The associated List of strings.
*
* @throws ConversionException is thrown if the key maps to an
* object that is not a List.
*/
- <T> List<T> getList(String key, List<T> defaultValue);
+ <E> List<E> getList(String key, List<E> defaultValue);
}