|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.codec.language.RefinedSoundex
Encodes a string into a soundex value. Sounde is an encoding used to relate similar names, but can also be used as a general purpose scheme to find word with similar phonemes. More information may be found at: http://www.bluepoof.com/Soundex/info2.html
Field Summary | |
private char[] |
soundexMapping
|
static RefinedSoundex |
US_ENGLISH
|
static char[] |
US_ENGLISH_MAPPING
|
Constructor Summary | |
RefinedSoundex()
|
|
RefinedSoundex(char[] mapping)
|
Method Summary | |
java.lang.Object |
encode(java.lang.Object pObject)
All encoders allow a library-user to pass an Object and get an Object in return. |
java.lang.String |
encode(java.lang.String pString)
Encode a String and produce a String. |
private char |
getMappingCode(char c)
Used internally by the SoundEx algorithm. |
java.lang.String |
soundex(java.lang.String str)
Get the SoundEx value of a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char[] US_ENGLISH_MAPPING
public static final RefinedSoundex US_ENGLISH
private char[] soundexMapping
Constructor Detail |
public RefinedSoundex()
public RefinedSoundex(char[] mapping)
Method Detail |
public java.lang.String soundex(java.lang.String str)
public java.lang.String encode(java.lang.String pString) throws EncoderException
StringEncoder
encode
in interface StringEncoder
pString
- a String to encode
EncoderException
- thrown if there is
an error conidition during the Encoding process.public java.lang.Object encode(java.lang.Object pObject) throws EncoderException
Encoder
encode
in interface Encoder
pObject
- An object ot encode
EncoderException
- an encoder exception is
thrown if the encoder experiences a failure
condition during the encoding process.private char getMappingCode(char c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |