jcolibri.method.retrieve.NNretrieval.similarity.local
Class EqualsStringIgnoreCase

java.lang.Object
  extended by jcolibri.method.retrieve.NNretrieval.similarity.local.EqualsStringIgnoreCase
All Implemented Interfaces:
LocalSimilarityFunction

public class EqualsStringIgnoreCase
extends java.lang.Object
implements LocalSimilarityFunction

This function returns 1 if both String are the same despite case letters, 0 in the other case


Constructor Summary
EqualsStringIgnoreCase()
           
 
Method Summary
 double compute(java.lang.Object s, java.lang.Object t)
          Applies the similarity funciton.
 boolean isApplicable(java.lang.Object o1, java.lang.Object o2)
          Applicable to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsStringIgnoreCase

public EqualsStringIgnoreCase()
Method Detail

compute

public double compute(java.lang.Object s,
                      java.lang.Object t)
               throws NoApplicableSimilarityFunctionException
Applies the similarity funciton.

Specified by:
compute in interface LocalSimilarityFunction
Parameters:
s - String
t - String
Returns:
the result of apply the similarity function.
Throws:
NoApplicableSimilarityFunctionException

isApplicable

public boolean isApplicable(java.lang.Object o1,
                            java.lang.Object o2)
Applicable to String

Specified by:
isApplicable in interface LocalSimilarityFunction

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es