Hilbert II - Version 0.03.08

org.qedeq.kernel.bo.module
Class ModuleReferenceList

java.lang.Object
  extended byorg.qedeq.kernel.bo.module.ModuleReferenceList

public class ModuleReferenceList
extends Object

Represents a reference list of modules. Every entry has a symbolic name for one referenced QEDEQ module. This module label acts as a prefix for all references to that module. The module label must be an unique String.

Version:
$Revision: 1.2 $

Constructor Summary
ModuleReferenceList()
          Constructs an empty list of module references.
 
Method Summary
 void add(ModuleContext context, String label, ModuleProperties prop)
          Add module reference to list.
 boolean equals(Object obj)
           
 String getLabel(int index)
          Get label for certain module.
 ModuleContext getModuleContext(int index)
          Get import context of referenced module.
 ModuleProperties getModuleProperties(int index)
          Get properties of referenced module.
 ModuleProperties getModuleProperties(String label)
          Get ModuleProperties of referenced module via label.
 int hashCode()
           
 int size()
          Get number of module references.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModuleReferenceList

public ModuleReferenceList()
Constructs an empty list of module references.

Method Detail

add

public final void add(ModuleContext context,
                      String label,
                      ModuleProperties prop)
               throws IllegalModuleDataException
Add module reference to list.

Parameters:
context - Within this context.
label - Referenced module gets this label. Must not be null or empty.
prop - Referenced module has this properties. Must not be null.
Throws:
IllegalModuleDataException - The id already exists or is null.

size

public final int size()
Get number of module references.

Returns:
Number of module references.

getLabel

public final String getLabel(int index)
Get label for certain module.

Parameters:
index - Entry index.
Returns:
Label of module.

getModuleProperties

public final ModuleProperties getModuleProperties(int index)
Get properties of referenced module.

Parameters:
index - Entry index.
Returns:
Module properties for that module.

getModuleContext

public final ModuleContext getModuleContext(int index)
Get import context of referenced module.

Parameters:
index - Entry index.
Returns:
Context for that module.

getModuleProperties

public final ModuleProperties getModuleProperties(String label)
Get ModuleProperties of referenced module via label. Might be null.

Parameters:
label - Label for referenced module or null if not found.
Returns:
Module properties for that module.

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

toString

public String toString()

Hilbert II - Version 0.03.08

©left GNU General Public Licence
All Rights Reserved.