You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by do...@apache.org on 2001/03/15 05:41:25 UTC
cvs commit: jakarta-avalon/src/java/org/apache/avalon/configuration DefaultConfiguration.java
donaldp 01/03/14 20:41:25
Modified: src/java/org/apache/avalon/configuration
DefaultConfiguration.java
Log:
Made interface more useful if constructing configurations by hand.
Revision Changes Path
1.2 +20 -0 jakarta-avalon/src/java/org/apache/avalon/configuration/DefaultConfiguration.java
Index: DefaultConfiguration.java
===================================================================
RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/configuration/DefaultConfiguration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultConfiguration.java 2001/02/24 04:00:14 1.1
+++ DefaultConfiguration.java 2001/03/15 04:41:25 1.2
@@ -185,6 +185,17 @@
}
}
+ public void setValue( final String value )
+ {
+ m_value = value;
+ }
+
+ public void setAttribute( final String name, final String value )
+ {
+ if( null == m_attributes ) m_attributes = new HashMap();
+ m_attributes.put( name, value );
+ }
+
/**
* Add an attribute to this configuration element, returning its old
* value or <b>null</b>.
@@ -207,6 +218,15 @@
}
m_children.add( configuration );
+ }
+
+ /**
+ * Remove a child <code>Configuration</code> to this configuration element.
+ */
+ public void removeChild( final Configuration configuration )
+ {
+ if( null == m_children ) return;
+ m_children.remove( configuration );
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org