Class DistanceFactory

  extended by<DistanceFunction>
      extended by

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
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
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


public static boolean isInitialized
Method Detail


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



public static void initialization()


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>
props - map of parameters for creating a distance function
newly created distance function


public DistanceFunction create(java.lang.String distance)


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


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>
parameter containing the default type.

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