com.internationalnetwork.util.conf
Class Container

Object
  extended by com.internationalnetwork.util.conf.ConfigurationDirective
      extended by com.internationalnetwork.util.conf.Container
Direct Known Subclasses:
ContainerRoot

public class Container
extends ConfigurationDirective

This class extends the ConfigurationDirective class, and is used for the storage of containers.


Field Summary
static String VERSION
          Version number of this Package (read-only).
 
Constructor Summary
Container(String name, String value)
          Instantiates a new Container object.
 
Method Summary
 boolean contains(String directiveName)
          Indicates if the specified ConfigurationDirective name exists within this Container, or any parent Container.  Traversal up to the root of the configuration hierarchy is performed as part of this operation.
 boolean containsChild(String directiveName)
          Indicates if the specified ConfigurationDirective name exists within this Container.  Traversal up to the root of the configuration hierarchy is NOT performed as part of this operation.
 ConfigurationDirective[] getDirectives(String directiveName)
          Returns the directive associated with the specified Directive/Container name that is within this Container.  If the specified directive is not defined within the current branch, traversal up to the root of the configuration hierarchy occurs to resolve an inherited value, or NULL if a value cannot be inherited.
 
Methods inherited from class com.internationalnetwork.util.conf.ConfigurationDirective
add, first, getAtom, getAtom, getAtoms, getAtoms, getAtomsCombined, getBranches, getBranchesTotal, getChildren, getChildrenTotal, getContainerDirectives, getDefaultValue, getFirstValue, getLineNumbers, getName, getNameLiteral, getRule, getValue, getValue, hasRule, isContainer, isContainerTerminator, isDirective, isRoot, last, next, parent, prev, previous, wasMultiLine
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Version number of this Package (read-only).

See Also:
Constant Field Values
Constructor Detail

Container

public Container(String name,
                 String value)
Instantiates a new Container object.

Parameters:
name - Name of Container
value - All parameters that come after the Container's name
Method Detail

contains

public final boolean contains(String directiveName)
Indicates if the specified ConfigurationDirective name exists within this Container, or any parent Container.  Traversal up to the root of the configuration hierarchy is performed as part of this operation.

The directiveName is not case-sensitive, and all variations of case will yield the same results.

Parameters:
directiveName - Name of ConfigurationDirective to check
Returns:
boolean True = Is present, False = Not found

containsChild

public final boolean containsChild(String directiveName)
Indicates if the specified ConfigurationDirective name exists within this Container.  Traversal up to the root of the configuration hierarchy is NOT performed as part of this operation.

The directiveName is not case-sensitive, and all variations of case will yield the same results.

Overrides:
containsChild in class ConfigurationDirective
Parameters:
directiveName - Name of ConfigurationDirective to check
Returns:
boolean True = Is present, False = Not found

getDirectives

public final ConfigurationDirective[] getDirectives(String directiveName)
Returns the directive associated with the specified Directive/Container name that is within this Container.  If the specified directive is not defined within the current branch, traversal up to the root of the configuration hierarchy occurs to resolve an inherited value, or NULL if a value cannot be inherited.

If this operation is performed on a non-container type object, then its parent container will be used to locate the specified value.

Parameters:
directiveName - Name of ConfigurationDirective to obtain the values for
Returns:
ConfigurationDirective[] The values (or inherited values) as defined in the original configuration stream, or else NULL if not defined