net.sourceforge.groboutils.codecoverage.v2.datastore
Class AnalysisModuleSet

java.lang.Object
  extended bynet.sourceforge.groboutils.codecoverage.v2.datastore.AnalysisModuleSet

public class AnalysisModuleSet
extends java.lang.Object

Contains data associated with each analysis module.

Since:
December 15, 2002
Version:
$Date: 2003/05/03 01:56:11 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Constructor Summary
AnalysisModuleSet()
          Default constructor
AnalysisModuleSet(AnalysisModuleSet ams)
          Copy ams's modules into this new set.
AnalysisModuleSet(IAnalysisModule[] modules)
          Create an instance using the given array of modules as the default set.
 
Method Summary
 void addAnalysisModule(IAnalysisModule module)
          Add a module to the set.
 void addAnalysisModules(IAnalysisModule[] modules)
          Add an array of modules to this set.
 IAnalysisModule getAnalysisModuleAt(short index)
          Returns the module stored at the given index index.
 int getAnalysisModuleCount()
          Retrieve the number of modules stored in this set.
 short getAnalysisModuleIndex(IAnalysisModule am)
          Returns the module am's index.
 IAnalysisModule[] getAnalysisModules()
          Return a complete list of modules in order.
 short getMeasureIndex(java.lang.String measureName)
          Retrieves the index associated with the module with the given measure name.
 void joinAnalysisModuleSet(AnalysisModuleSet set)
          Join a module set to this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalysisModuleSet

public AnalysisModuleSet()
Default constructor


AnalysisModuleSet

public AnalysisModuleSet(IAnalysisModule[] modules)
Create an instance using the given array of modules as the default set.

Parameters:
modules - collection of modules to initialize the set with.
Throws:
java.lang.IllegalArgumentException - if modules is null.

AnalysisModuleSet

public AnalysisModuleSet(AnalysisModuleSet ams)
Copy ams's modules into this new set.

Parameters:
ams - the set to copy from
Throws:
java.lang.IllegalArgumentException - if ams is null.
Method Detail

addAnalysisModules

public void addAnalysisModules(IAnalysisModule[] modules)
Add an array of modules to this set.

Parameters:
modules - the array of modules to add to the set
Throws:
java.lang.IllegalArgumentException - if modules is null, or if any element in the array is null.

addAnalysisModule

public void addAnalysisModule(IAnalysisModule module)
Add a module to the set.

Parameters:
module - the module to add.
Throws:
java.lang.IllegalArgumentException - if module is null.
java.lang.IllegalStateException - if module has a measure name that is the same as a previously added module.

joinAnalysisModuleSet

public void joinAnalysisModuleSet(AnalysisModuleSet set)
Join a module set to this set. It will not add to this set any repeated measure names that are in the given set.

Parameters:
set - the module set to add.
Throws:
java.lang.IllegalArgumentException - if set is null.

getAnalysisModules

public IAnalysisModule[] getAnalysisModules()
Return a complete list of modules in order.

Returns:
the ordered array of stored modules.

getMeasureIndex

public short getMeasureIndex(java.lang.String measureName)
Retrieves the index associated with the module with the given measure name.

Parameters:
measureName - the measure name of the module.
Returns:
the index of the module, or -1 if there is no such module with the given measure name.
Throws:
java.lang.IllegalArgumentException - if measureName is null.
See Also:
getAnalysisModuleIndex( IAnalysisModule )

getAnalysisModuleIndex

public short getAnalysisModuleIndex(IAnalysisModule am)
Returns the module am's index.

Parameters:
am - the module.
Returns:
the index of am, or -1 if it is not stored in this set.
Throws:
java.lang.IllegalArgumentException - if am is null.
See Also:
#getMeasureIndex( Stirng )

getAnalysisModuleCount

public int getAnalysisModuleCount()
Retrieve the number of modules stored in this set.

Returns:
the number of modules in the set.

getAnalysisModuleAt

public IAnalysisModule getAnalysisModuleAt(short index)
Returns the module stored at the given index index.

Returns:
the module at index index.
Throws:
java.lang.IllegalArgumentException - if index is less than 0 or greater than or equal to the returned value of getAnalysisModuleCount().


Copyright © 2001-2003 by The GroboUtils Project