net.dpml.metro.data
Class CategoriesDirective

java.lang.Object
  extended bynet.dpml.metro.data.AbstractDirective
      extended bynet.dpml.metro.data.CategoryDirective
          extended bynet.dpml.metro.data.CategoriesDirective
All Implemented Interfaces:
Serializable

public class CategoriesDirective
extends CategoryDirective
implements Serializable

Description of the configuration of a set of categories.

Version:
1.0.1
Author:
Digital Product Meta Library
See Also:
CategoryDirective, Serialized Form

Constructor Summary
CategoriesDirective()
          Create a CategoriesDirective instance.
CategoriesDirective(CategoryDirective[] categories)
          Create a CategoriesDirective instance.
CategoriesDirective(String name)
          Create a CategoriesDirective instance.
CategoriesDirective(String name, Priority priority, String target, CategoryDirective[] categories)
          Create a CategoriesDirective instance.
 
Method Summary
 boolean equals(Object other)
          Test this object for equality with the suppplied object.
 CategoryDirective[] getCategories()
          Return the set of logging categories.
 CategoryDirective getCategoryDirective(String name)
          Return a named category.
 int hashCode()
          Return the hashcode for the object.
 
Methods inherited from class net.dpml.metro.data.CategoryDirective
getName, getPriority, getTarget
 
Methods inherited from class net.dpml.metro.data.AbstractDirective
getPartHandlerURI, setupURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CategoriesDirective

public CategoriesDirective()
Create a CategoriesDirective instance.


CategoriesDirective

public CategoriesDirective(String name)
Create a CategoriesDirective instance.

Parameters:
name - the base category name

CategoriesDirective

public CategoriesDirective(CategoryDirective[] categories)
Create a CategoriesDirective instance.

Parameters:
categories - the categories to include in the directive

CategoriesDirective

public CategoriesDirective(String name,
                           Priority priority,
                           String target,
                           CategoryDirective[] categories)
                    throws NullPointerException
Create a CategoriesDirective instance.

Parameters:
name - the base category name
priority - the default logging priority
target - the default logging target
categories - the logging category descriptors
Throws:
NullPointerException - if a category array value is null
Method Detail

getCategories

public CategoryDirective[] getCategories()
Return the set of logging categories.

Returns:
the set of category declarations

getCategoryDirective

public CategoryDirective getCategoryDirective(String name)
Return a named category.

Parameters:
name - the category name
Returns:
the category declaration

equals

public boolean equals(Object other)
Test this object for equality with the suppplied object.

Overrides:
equals in class CategoryDirective
Parameters:
other - the other object
Returns:
TRUE if this object equals the supplied object else FALSE

hashCode

public int hashCode()
Return the hashcode for the object.

Overrides:
hashCode in class CategoryDirective
Returns:
the hashcode