|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.EPQLibrary.AlgorithmClass
public abstract class AlgorithmClass
A simple class that implements various common properties of classes that implement algorithms.
AlgorithmClass objects have a general type ('class') name and a specific instance name. They can also contain a reference detailing the source of the algorithm.
AlgorithmClass objects also define a list of default AlgorithmClass instances on which they depend. Replacements for these default AlgorithmClass instances can be specified using the Strategy mechanism.
Copyright: 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
Company: National Institute of Standards and Technology
| Constructor Summary | |
|---|---|
protected |
AlgorithmClass(java.lang.String clss,
java.lang.String name,
Reference ref)
|
protected |
AlgorithmClass(java.lang.String clss,
java.lang.String name,
java.lang.String ref)
|
| Method Summary | |
|---|---|
protected void |
addDefaultAlgorithm(java.lang.Class cls,
AlgorithmClass ac)
addDefaultAlgorithm - Specify a default algorithm. |
static java.lang.String[] |
allAlgorithmNames()
allAlgorithmNames - Gets an array of String containing a description of all algorithms as returned by toString(). |
static java.util.SortedSet |
allAlgorithms()
allAlgorithms - An unmodifiable list of all available algorithms of all various different classes. |
static void |
applyGlobalOverride(Strategy strat)
applyGlobalOverride - Apply the specified Strategy as a gloabal overrride for all AlgorithmClass objects. |
static void |
clearGlobalOverride()
clearGlobalOverride - Clear the global strategy override restoring each algorithm to use its default algorithms. |
int |
compareTo(java.lang.Object o)
compareTo - Sort by name |
void |
documentStrategy(java.io.Writer wr)
Outputs a description of the current Strategy to the specified Writer. |
Strategy |
getActiveStrategy()
getActiveStrategy - Returns a Strategy object containing a complete set of the the AlgorithmClass objects on which this AlgorithmClass object depends. |
protected AlgorithmClass |
getAlgorithm(java.lang.Class cls)
getAlgorithm - Returns the specific algorithm associated with the base class provided as an argument. |
java.lang.String |
getAlgorithmClass()
getAlgorithmClass - Get the base AlgorithmClass instance of which this class is an instance. |
abstract java.util.List |
getAllImplementations()
getAllImplementations - Returns a list of all implementations of the derived algorithm class. |
java.lang.String |
getName()
getName - Get the abbreviated name of the algorithm. |
java.lang.String |
getReference()
getReference - Get the literature reference describing the implementation of this algorithm. |
protected abstract void |
initializeDefaultStrategy()
initializeDefaultStrategy - Implement this method in derived classes to specify the contents (possibly null) of the default Strategy using the addDefaultAlgorithm(Class,AlgorithmClass) method. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AlgorithmClass(java.lang.String clss,
java.lang.String name,
Reference ref)
protected AlgorithmClass(java.lang.String clss,
java.lang.String name,
java.lang.String ref)
| Method Detail |
|---|
public abstract java.util.List getAllImplementations()
protected abstract void initializeDefaultStrategy()
public Strategy getActiveStrategy()
protected AlgorithmClass getAlgorithm(java.lang.Class cls)
cls -
public static void applyGlobalOverride(Strategy strat)
strat - public static void clearGlobalOverride()
protected void addDefaultAlgorithm(java.lang.Class cls,
AlgorithmClass ac)
cls - ac - public static java.util.SortedSet allAlgorithms()
Note: Classes are only added to this list when they are first instanciated. However this may never happen if the algorithm is never used.
public static java.lang.String[] allAlgorithmNames()
Note: Classes are only added to this list when they are first instanciated. However this may never happen if the algorithm is never used.
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - Object
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getAlgorithmClass()
public java.lang.String getName()
public java.lang.String getReference()
public void documentStrategy(java.io.Writer wr)
throws java.io.IOException
wr -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||