kwic
Class DefaultWordFilter

java.lang.Object
  |
  +--kwic.DefaultWordFilter
All Implemented Interfaces:
WordCanonical

public class DefaultWordFilter
extends Object
implements WordCanonical

A default implementation of the WordCanonical interface. Why isn't this a private class of Word? Why isn't this an inner class of Word?


Constructor Summary
DefaultWordFilter()
           
 
Method Summary
static kwic.WordCanonical instance()
          Singleton pattern: return one instance, always the same, of this class.
 String makeCanonical(String temp)
          Filter the supplied String (which is the String of a Word presumably) into a canonical form for subsequent matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWordFilter

public DefaultWordFilter()
Method Detail

makeCanonical

public String makeCanonical(String temp)
Filter the supplied String (which is the String of a Word presumably) into a canonical form for subsequent matching. For this default filter, do the following:

Specified by:
makeCanonical in interface WordCanonical

instance

public static kwic.WordCanonical instance()
Singleton pattern: return one instance, always the same, of this class.