de.unidu.is.text
Class SoundexFilter

java.lang.Object
  extended byde.unidu.is.text.AbstractFilter
      extended byde.unidu.is.text.AbstractSingleItemFilter
          extended byde.unidu.is.text.SoundexFilter
All Implemented Interfaces:
Filter, SingleItemFilter

public class SoundexFilter
extends AbstractSingleItemFilter

This filter converts a specified string into its soundex representation. This is useful for testing whether strings sound the same.

This implementation uses the nonfree version (not packaged here) if available (for backwards compatibility), and the Apache Jakarta Commons Codec implementation otherwise.

Since:
2003-07-04
Version:
$Revision: 1.8 $, $Date: 2005/02/28 22:27:55 $
Author:
Henrik Nottelmann

Field Summary
protected  SingleItemFilter soundexFilter
          Soundex filter to which calls are delegated.
 
Fields inherited from class de.unidu.is.text.AbstractFilter
nextFilter
 
Constructor Summary
SoundexFilter(Filter nextFilter)
          Creates a new instance and sets the next filter in the chain.
 
Method Summary
 java.lang.Object run(java.lang.Object value)
          Converts the specified object into its soundex value.
 
Methods inherited from class de.unidu.is.text.AbstractSingleItemFilter
filter
 
Methods inherited from class de.unidu.is.text.AbstractFilter
apply, apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

soundexFilter

protected SingleItemFilter soundexFilter
Soundex filter to which calls are delegated.

Constructor Detail

SoundexFilter

public SoundexFilter(Filter nextFilter)
Creates a new instance and sets the next filter in the chain.

Parameters:
nextFilter - next filter in the filter chain
Method Detail

run

public java.lang.Object run(java.lang.Object value)
Converts the specified object into its soundex value.

Parameters:
value - string to be converted
Returns:
soundex representation of the specified value