crn
Class IESpecificComparisonManager

java.lang.Object
  extended bycrn.IESpecificComparisonManager

public final class IESpecificComparisonManager
extends java.lang.Object

Provides a way of specific IEs comparison.

Author:
Piotrek

Field Summary
private  java.util.Hashtable specificComparators
          A hashtable mapping the IE names to the specific comparators.
 
Constructor Summary
IESpecificComparisonManager()
           
 
Method Summary
 void AddSpecificComparator(java.lang.String ieName, IEComparator ieComparator)
          Adds a specific comparator for the given IE type.
 float CompareIEs(IE ie1, IE ie2)
          Compares the given IEs.
 boolean HasSpecificComparator(java.lang.String ieName)
          Checks if there is a specific comparator for the given IE type.
 void RemoveSpecificComparator(java.lang.String ieName)
          Removes a specific comparator for the given IE type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

specificComparators

private java.util.Hashtable specificComparators
A hashtable mapping the IE names to the specific comparators.

Constructor Detail

IESpecificComparisonManager

public IESpecificComparisonManager()
Method Detail

HasSpecificComparator

public boolean HasSpecificComparator(java.lang.String ieName)
Checks if there is a specific comparator for the given IE type.

Parameters:
ieName - The name of the IE type to look for.
Returns:
A boolean value indicating whether there is a specific comaprator for the given IE type.

AddSpecificComparator

public void AddSpecificComparator(java.lang.String ieName,
                                  IEComparator ieComparator)
Adds a specific comparator for the given IE type.

Parameters:
ieName - The name of the IE for which to add the specific comparator.
ieComparator - The comparator for the given IE type.

RemoveSpecificComparator

public void RemoveSpecificComparator(java.lang.String ieName)
Removes a specific comparator for the given IE type.

Parameters:
ieName - The name of the IE for which to remove the specific comparator.

CompareIEs

public float CompareIEs(IE ie1,
                        IE ie2)
Compares the given IEs.

Parameters:
ie1 - The first of the IEs to be compared.
ie2 - The second of the IEs to be compared.
Returns:
The similarity of the given IEs.