Hi Jörg,

specialization between two concpets in the oo paradigm has the semantics of
a is-a-relationship. So if Configuration extends ImmutableConfiguration
that means (at least for me) that a Configuration is a
ImmutableConfiguration.
That's what I meant with my first comment.

About merging the two:
If there is no class that implements ImmutableConfiguration and no
interface other then Configuration that extends it. What is the point of
having it in the first place?
For example the two could be merged together and a class
AbstractImmutableConfiguration could implement the merged Interface (let's
call it Configuration). That class would throw
UnsupportedOperationException if one of the write methods is called.
This would be like the definition of Collection.add(E o). Subclasses may
implement the add operation but can also chose not to.

Benedikt


2012/11/5 Jörg Schaible <joerg.schai...@gmx.de>

> Benedikt Ritter wrote:
>
> > 2012/11/5 Benedikt Ritter <benerit...@gmail.com>
> >
> >> Hi Oliver,
> >>
> >>
> >> 2012/11/5 <ohe...@apache.org>
> >>
> >> Author: oheger
> >>> Date: Mon Nov  5 17:29:01 2012
> >>> New Revision: 1405889
> >>>
> >>> URL: http://svn.apache.org/viewvc?rev=1405889&view=rev
> >>> Log:
> >>> Initial version of an immutable configuration interface.
> >>>
> >>> Added:
> >>>
> >>>
>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/ImmutableConfiguration.java
> >>>   (with props)
> >>> Modified:
> >>>
> >>>
>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/Configuration.java
> >>>
> >>> Modified:
> >>>
>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/Configuration.java
> >>> URL:
> >>>
>
> http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/Configuration.java?rev=1405889&r1=1405888&r2=1405889&view=diff
> >>>
> >>>
>
> ==============================================================================
> >>> ---
> >>>
>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/Configuration.java
> >>> (original)
> >>> +++
> >>>
>
> commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/Configuration.java
> >>> Mon Nov  5 17:29:01 2012
> >>> @@ -17,11 +17,6 @@
> >>>
> >>>  package org.apache.commons.configuration;
> >>>
> >>> -import java.math.BigDecimal;
> >>> -import java.math.BigInteger;
> >>> -import java.util.Iterator;
> >>> -import java.util.List;
> >>> -import java.util.Properties;
> >>>
> >>>  /**
> >>>   * <p>The main Configuration interface.</p>
> >>> @@ -54,7 +49,7 @@ import java.util.Properties;
> >>>   * @author Commons Configuration team
> >>>   * @version $Id$
> >>>   */
> >>> -public interface Configuration
> >>> +public interface Configuration extends ImmutableConfiguration
> >>>
> >>
> >> A Configuration IS_A ImmutableConfiguration sounds rather akward. The
> >> JavaDoc of ImmutableConfiguration says "The main interface for accessing
> >> configuration data in a read-only fashion." Maybe ImmutableConfiguration
> >> should be renamed to ReadOnlyConfiguration?
> >>
> >> Regards,
> >> Benedikt
> >>
> >
> > Looking at the code base, there is no class that implements
> > ImmutableConfiguration directly and Configuration is the only interface
> > that extends ImmutableConfiguration. So maybe the two can be merged
> > together?
>
> And why do YOU think, that an immutable and a mutable Configuration is the
> same thing? Sorry, your comments do not make any sense to me!
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to