org.apache.velocity.tools.config
Class CompoundConfiguration<C extends Configuration>

java.lang.Object
  extended by org.apache.velocity.tools.config.Configuration
      extended by org.apache.velocity.tools.config.CompoundConfiguration<C>
All Implemented Interfaces:
java.lang.Comparable<Configuration>
Direct Known Subclasses:
FactoryConfiguration, ToolboxConfiguration

public class CompoundConfiguration<C extends Configuration>
extends Configuration

This class manages a SortedSet of child Configurations as well as being a Configuration itself.

Version:
$Id: Configuration.java 511959 2007-02-26 19:24:39Z nbubna $
Author:
Nathan Bubna

Field Summary
private  java.util.SortedSet<C> children
           
 
Constructor Summary
CompoundConfiguration()
           
 
Method Summary
protected  void addChild(C newKid)
           
 void addConfiguration(CompoundConfiguration<C> config)
           
protected  void appendChildren(java.lang.StringBuilder out, java.lang.String childrenName, java.lang.String childDelim)
           
 boolean equals(java.lang.Object obj)
           
protected  C getChild(C kid)
           
protected  java.util.Collection<C> getChildren()
           
protected  boolean hasChildren()
           
 int hashCode()
           
protected  boolean removeChild(C config)
           
protected  void setChildren(java.util.Collection<C> kids)
           
 void validate()
           
 
Methods inherited from class org.apache.velocity.tools.config.Configuration
addConfiguration, addProperty, appendProperties, compareTo, getProperties, getProperty, getPropertyMap, hasProperties, removeProperty, removeProperty, setProperties, setProperty, setPropertyMap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

private final java.util.SortedSet<C extends Configuration> children
Constructor Detail

CompoundConfiguration

public CompoundConfiguration()
Method Detail

addChild

protected void addChild(C newKid)

removeChild

protected boolean removeChild(C config)

hasChildren

protected boolean hasChildren()

getChildren

protected java.util.Collection<C> getChildren()

setChildren

protected void setChildren(java.util.Collection<C> kids)

getChild

protected C getChild(C kid)

addConfiguration

public void addConfiguration(CompoundConfiguration<C> config)

validate

public void validate()
Overrides:
validate in class Configuration

appendChildren

protected void appendChildren(java.lang.StringBuilder out,
                              java.lang.String childrenName,
                              java.lang.String childDelim)

hashCode

public int hashCode()
Overrides:
hashCode in class Configuration

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Configuration


Copyright (c) 2003-2007 Apache Software Foundation