|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.nist.antd.optical.AbstractObject
|
+--gov.nist.antd.optical.algorithm.AlgorithmContainer
Only one instance of this container is existent per network. The container has knowledge about the whole topology by referencing to the Net instance of the simulation framework. The container contains "centralized" algorithms. This algorithms are working on the whole topology. While running such an algorithm the topology must not be changed from the outside.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Field Summary | |
private Algorithm[] |
algorithms
The list of the algorithms available for this OXC. |
private Net |
net
The net that contains the topology. |
private static java.util.Hashtable |
NETWORKS
The global container. |
private int |
noAlgorithms
The number of stored algorithms in the array. |
| Fields inherited from class gov.nist.antd.optical.AbstractObject |
INITIAL_ARRAY_SIZE |
| Constructor Summary | |
private |
AlgorithmContainer()
Default constructor. |
| Method Summary | |
void |
addAlgorithm(Algorithm algorithm)
Adds the given algorithm to the container. |
void |
clear()
Removes all assigned algorithms of the container. |
protected java.lang.Object[] |
createArray(int size)
Creates an array of the specified size. |
Algorithm[] |
getAlgorithms()
Returns an array containing all algorithms. |
Algorithm |
getByName(java.lang.String name)
This method returns the centralized algorithm with the specified name. |
static AlgorithmContainer |
getContainer(Net net)
Determines the AlgorithmContainer that belongs to the network. |
Net |
getNet()
Determines the net instance. |
int |
getSize()
Returns the number of Algorithms stored in the Container. |
void |
removeAlgorithm(Algorithm algorithm)
Removes the given algorithm. |
void |
removeAlgorithm(java.lang.String name)
Removes the specified algorithm. |
static void |
removeContainer(Net net)
Remove the containers of the given net. |
void |
setNet(Net net)
Set the net object. |
protected void |
setNoElements(int size)
Set the number of elements. |
| Methods inherited from class gov.nist.antd.optical.AbstractObject |
addElement, clear, isElementOf, removeElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.util.Hashtable NETWORKS
private int noAlgorithms
private Net net
private Algorithm[] algorithms
| Constructor Detail |
private AlgorithmContainer()
| Method Detail |
public static AlgorithmContainer getContainer(Net net)
net - The Network the container belongs to.
public static void removeContainer(Net net)
net - The network to remove.
public void addAlgorithm(Algorithm algorithm)
throws AlgorithmException
algorithm - the algorithm that has to be added.
AlgorithmException - if the algorithm is already added.public void clear()
public Algorithm[] getAlgorithms()
public Algorithm getByName(java.lang.String name)
name - the name of the algorithm. The name is case sensitive.
public int getSize()
public void removeAlgorithm(Algorithm algorithm)
throws AlgorithmException
algorithm - the Algorithm that has to be removed.
AlgorithmException - the specified algorithm does not exist.
public void removeAlgorithm(java.lang.String name)
throws AlgorithmException
name - the name of the algorithm.
AlgorithmException - the algorithm does not exist in the
container.public Net getNet()
public void setNet(Net net)
net - the instance of net.protected java.lang.Object[] createArray(int size)
createArray in class AbstractObjectsize - the given size.
protected void setNoElements(int size)
setNoElements in class AbstractObjectsize - the new number of elements.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||