nz.ac.waikato.mcennis.rat.reusablecores.distance
Class DistanceFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.AbstractFactory<DistanceFunction>
      extended by nz.ac.waikato.mcennis.rat.reusablecores.distance.DistanceFactory

public class DistanceFactory
extends AbstractFactory<DistanceFunction>

Class for creating a distance function. The Functions are created by creating new static DistanceFactory and then submitting a java.util.Properties object where the 'DistanceFunction' parameter is the simple name of the desired distance function's simple class name.


Field Summary
static boolean isInitialized
           
 
Fields inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
map, properties
 
Method Summary
 DistanceFunction create(Properties props)
          Create a distance function using the 'DistanceFunction' parameter.
 DistanceFunction create(java.lang.String distance)
           
 DistanceFunction create(java.lang.String name, Properties parameters)
           
 Parameter getClassParameter()
          Return the parameter containing the name of the default type produced by this object.
static void initialization()
           
static DistanceFactory newInstance()
          Return a singleton DistanceFactory, creating it if necessary.
 
Methods inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
addDefaultProperty, addType, check, check, getKnownTypes, getParameter, getParameter, setDefaultProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isInitialized

public static boolean isInitialized
Method Detail

newInstance

public static DistanceFactory newInstance()
Return a singleton DistanceFactory, creating it if necessary.

Returns:
DistanceFactory

initialization

public static void initialization()

create

public DistanceFunction create(Properties props)
Create a distance function using the 'DistanceFunction' parameter. Each distance function can be modified using class-specific parameters. Returns null if no distance function is found of the given name. Returns null if the property object either doesn't contain a 'DistanceFunction' property or is null.

Specified by:
create in class AbstractFactory<DistanceFunction>
Parameters:
props - map of parameters for creating a distance function
Returns:
newly created distance function

create

public DistanceFunction create(java.lang.String distance)

create

public DistanceFunction create(java.lang.String name,
                               Properties parameters)

getClassParameter

public Parameter getClassParameter()
Description copied from class: AbstractFactory
Return the parameter containing the name of the default type produced by this object. The parameter will have exactly one value of type String. The type name of this parameter is the type that controls which class of object is produced.

Specified by:
getClassParameter in class AbstractFactory<DistanceFunction>
Returns:
parameter containing the default type.

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads