Return-Path:
X-Original-To: apmail-commons-commits-archive@minotaur.apache.org
Delivered-To: apmail-commons-commits-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 6DF1210141
for ;
Sun, 2 Mar 2014 19:45:30 +0000 (UTC)
Received: (qmail 1876 invoked by uid 500); 2 Mar 2014 19:45:28 -0000
Delivered-To: apmail-commons-commits-archive@commons.apache.org
Received: (qmail 1786 invoked by uid 500); 2 Mar 2014 19:45:27 -0000
Mailing-List: contact commits-help@commons.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@commons.apache.org
Delivered-To: mailing list commits@commons.apache.org
Received: (qmail 1779 invoked by uid 99); 2 Mar 2014 19:45:27 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Mar 2014 19:45:27 +0000
X-ASF-Spam-Status: No, hits=-2000.0 required=5.0
tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4)
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Mar 2014 19:45:26 +0000
Received: from eris.apache.org (localhost [127.0.0.1])
by eris.apache.org (Postfix) with ESMTP id 702C223889CB;
Sun, 2 Mar 2014 19:45:06 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r1573342 -
/commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
Date: Sun, 02 Mar 2014 19:45:06 -0000
To: commits@commons.apache.org
From: oheger@apache.org
X-Mailer: svnmailer-1.0.9
Message-Id: <20140302194506.702C223889CB@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: oheger
Date: Sun Mar 2 19:45:06 2014
New Revision: 1573342
URL: http://svn.apache.org/r1573342
Log:
Changed HierarchicalConfiguration interface to deal with arbitrary nodes.
The interface now has a generic parameter for the type of nodes an
implementation deals with.
Modified:
commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
Modified: commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java?rev=1573342&r1=1573341&r2=1573342&view=diff
==============================================================================
--- commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java (original)
+++ commons/proper/configuration/branches/immutableNodes/src/main/java/org/apache/commons/configuration/HierarchicalConfiguration.java Sun Mar 2 19:45:06 2014
@@ -19,7 +19,6 @@ package org.apache.commons.configuration
import java.util.Collection;
import java.util.List;
-import org.apache.commons.configuration.tree.ConfigurationNode;
import org.apache.commons.configuration.tree.ExpressionEngine;
/**
@@ -28,14 +27,21 @@ import org.apache.commons.configuration.
*
*
* This interface introduces methods for manipulating tree-like structured
- * configuration sources. Also, all methods defined by the
- * {@code Configuration} interface are available.
+ * configuration sources. Also, all methods defined by the {@code Configuration}
+ * interface are available.
+ *
+ *
+ * This interface does not make any assumptions about the concrete type of nodes
+ * used by an implementation; this is reflected by a generic type parameter.
+ * Concrete implementations may therefore define their own hierarchical
+ * structures.
*
*
* @version $Id$
* @since 2.0
+ * @param the type of the nodes used by this hierarchical configuration
*/
-public interface HierarchicalConfiguration
+public interface HierarchicalConfiguration
extends Configuration, ImmutableHierarchicalConfiguration
{
/**
@@ -43,14 +49,14 @@ public interface HierarchicalConfigurati
*
* @return the root node
*/
- ConfigurationNode getRootNode();
+ T getRootNode();
/**
* Sets the root node of this hierarchical configuration.
*
* @param rootNode the root node
*/
- void setRootNode(ConfigurationNode rootNode);
+ void setRootNode(T rootNode);
/**
* Sets the expression engine to be used by this configuration. All property
@@ -83,7 +89,7 @@ public interface HierarchicalConfigurati
* @param nodes a collection with the {@code Node} objects to be
* added
*/
- void addNodes(String key, Collection extends ConfigurationNode> nodes);
+ void addNodes(String key, Collection extends T> nodes);
/**
*