1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.6.0_07) on Thu Aug 06 17:42:38 BST 2009 -->
6
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
8
Soundex (Commons Codec 1.4 API)
11
<META NAME="date" CONTENT="2009-08-06">
13
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
15
<SCRIPT type="text/javascript">
16
function windowTitle()
18
if (location.href.indexOf('is-external=true') == -1) {
19
parent.document.title="Soundex (Commons Codec 1.4 API)";
28
<BODY BGCOLOR="white" onload="windowTitle();">
32
<!-- ========= START OF TOP NAVBAR ======= -->
33
<A NAME="navbar_top"><!-- --></A>
34
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
35
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
37
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
38
<A NAME="navbar_top_firstrow"><!-- --></A>
39
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
40
<TR ALIGN="center" VALIGN="top">
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
43
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
44
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Soundex.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
45
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
46
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
47
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
48
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
52
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
58
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59
<A HREF="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><B>PREV CLASS</B></A>
60
NEXT CLASS</FONT></TD>
61
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62
<A HREF="../../../../../index.html?org/apache/commons/codec/language/Soundex.html" target="_top"><B>FRAMES</B></A>
63
<A HREF="Soundex.html" target="_top"><B>NO FRAMES</B></A>
64
<SCRIPT type="text/javascript">
67
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
72
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
81
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
85
<A NAME="skip-navbar_top"></A>
86
<!-- ========= END OF TOP NAVBAR ========= -->
89
<!-- ======== START OF CLASS DATA ======== -->
92
org.apache.commons.codec.language</FONT>
96
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
97
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.codec.language.Soundex</B>
100
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A>, <A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></DD>
104
<DT><PRE>public class <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.30"><B>Soundex</B></A><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></DL>
108
Encodes a string into a Soundex value. Soundex is an encoding used to relate similar names, but can also be used as a
109
general purpose scheme to find word with similar phonemes.
114
<DT><B>Version:</B></DT>
115
<DD>$Id: Soundex.java 794026 2009-07-14 19:21:23Z ggregory $</DD>
116
<DT><B>Author:</B></DT>
117
<DD>Apache Software Foundation</DD>
122
<!-- =========== FIELD SUMMARY =========== -->
124
<A NAME="field_summary"><!-- --></A>
125
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
126
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
127
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
128
<B>Field Summary</B></FONT></TH>
130
<TR BGCOLOR="white" CLASS="TableRowColor">
131
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132
<CODE>static <A HREF="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</A></CODE></FONT></TD>
133
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH">US_ENGLISH</A></B></CODE>
136
An instance of Soundex using the US_ENGLISH_MAPPING mapping.</TD>
138
<TR BGCOLOR="white" CLASS="TableRowColor">
139
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
140
<CODE>static char[]</CODE></FONT></TD>
141
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING">US_ENGLISH_MAPPING</A></B></CODE>
144
This is a default mapping of the 26 letters used in US English.</TD>
146
<TR BGCOLOR="white" CLASS="TableRowColor">
147
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
148
<CODE>static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
149
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING_STRING">US_ENGLISH_MAPPING_STRING</A></B></CODE>
152
This is a default mapping of the 26 letters used in US English.</TD>
156
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
158
<A NAME="constructor_summary"><!-- --></A>
159
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
160
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
161
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
162
<B>Constructor Summary</B></FONT></TH>
164
<TR BGCOLOR="white" CLASS="TableRowColor">
165
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex()">Soundex</A></B>()</CODE>
168
Creates an instance using US_ENGLISH_MAPPING</TD>
170
<TR BGCOLOR="white" CLASS="TableRowColor">
171
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(char[])">Soundex</A></B>(char[] mapping)</CODE>
174
Creates a soundex instance using the given mapping.</TD>
176
<TR BGCOLOR="white" CLASS="TableRowColor">
177
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(java.lang.String)">Soundex</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> mapping)</CODE>
180
Creates a refined soundex instance using a custom mapping.</TD>
184
<!-- ========== METHOD SUMMARY =========== -->
186
<A NAME="method_summary"><!-- --></A>
187
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
189
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
190
<B>Method Summary</B></FONT></TH>
192
<TR BGCOLOR="white" CLASS="TableRowColor">
193
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194
<CODE> int</CODE></FONT></TD>
195
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#difference(java.lang.String, java.lang.String)">difference</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s1,
196
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s2)</CODE>
199
Encodes the Strings and returns the number of characters in the two encoded Strings that are the same.</TD>
201
<TR BGCOLOR="white" CLASS="TableRowColor">
202
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
204
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#encode(java.lang.Object)">encode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)</CODE>
207
Encodes an Object using the soundex algorithm.</TD>
209
<TR BGCOLOR="white" CLASS="TableRowColor">
210
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
212
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#encode(java.lang.String)">encode</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)</CODE>
215
Encodes a String using the soundex algorithm.</TD>
217
<TR BGCOLOR="white" CLASS="TableRowColor">
218
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219
<CODE> int</CODE></FONT></TD>
220
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#getMaxLength()">getMaxLength</A></B>()</CODE>
223
<B>Deprecated.</B> <I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I></TD>
225
<TR BGCOLOR="white" CLASS="TableRowColor">
226
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227
<CODE> void</CODE></FONT></TD>
228
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#setMaxLength(int)">setMaxLength</A></B>(int maxLength)</CODE>
231
<B>Deprecated.</B> <I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I></TD>
233
<TR BGCOLOR="white" CLASS="TableRowColor">
234
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
236
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#soundex(java.lang.String)">soundex</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> str)</CODE>
239
Retrieves the Soundex code for a given String object.</TD>
242
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
243
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
244
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
245
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
247
<TR BGCOLOR="white" CLASS="TableRowColor">
248
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
254
<!-- ============ FIELD DETAIL =========== -->
256
<A NAME="field_detail"><!-- --></A>
257
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
258
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
259
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
260
<B>Field Detail</B></FONT></TH>
264
<A NAME="US_ENGLISH_MAPPING_STRING"><!-- --></A><H3>
265
US_ENGLISH_MAPPING_STRING</H3>
267
public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.42"><B>US_ENGLISH_MAPPING_STRING</B></A></PRE>
269
<DD>This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position
272
(This constant is provided as both an implementation convenience and to allow Javadoc to pick
273
up the value for the constant values page.)
277
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING"><CODE>US_ENGLISH_MAPPING</CODE></A>,
278
<A HREF="../../../../../constant-values.html#org.apache.commons.codec.language.Soundex.US_ENGLISH_MAPPING_STRING">Constant Field Values</A></DL>
282
<A NAME="US_ENGLISH_MAPPING"><!-- --></A><H3>
283
US_ENGLISH_MAPPING</H3>
285
public static final char[] <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.50"><B>US_ENGLISH_MAPPING</B></A></PRE>
287
<DD>This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position
291
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(char[])"><CODE>Soundex(char[])</CODE></A></DL>
295
<A NAME="US_ENGLISH"><!-- --></A><H3>
298
public static final <A HREF="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</A> <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.57"><B>US_ENGLISH</B></A></PRE>
300
<DD>An instance of Soundex using the US_ENGLISH_MAPPING mapping.
303
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING"><CODE>US_ENGLISH_MAPPING</CODE></A></DL>
306
<!-- ========= CONSTRUCTOR DETAIL ======== -->
308
<A NAME="constructor_detail"><!-- --></A>
309
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
310
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
311
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
312
<B>Constructor Detail</B></FONT></TH>
316
<A NAME="Soundex()"><!-- --></A><H3>
319
public <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.102"><B>Soundex</B></A>()</PRE>
321
<DD>Creates an instance using US_ENGLISH_MAPPING
324
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(char[])"><CODE>Soundex(char[])</CODE></A>,
325
<A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING"><CODE>US_ENGLISH_MAPPING</CODE></A></DL>
329
<A NAME="Soundex(char[])"><!-- --></A><H3>
332
public <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.116"><B>Soundex</B></A>(char[] mapping)</PRE>
334
<DD>Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized
335
mapping for a non-Western character set.
337
Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each
338
letter is mapped. This implementation contains a default map for US_ENGLISH
341
<DT><B>Parameters:</B><DD><CODE>mapping</CODE> - Mapping array to use when finding the corresponding code for a given character</DL>
345
<A NAME="Soundex(java.lang.String)"><!-- --></A><H3>
348
public <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.129"><B>Soundex</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> mapping)</PRE>
350
<DD>Creates a refined soundex instance using a custom mapping. This constructor can be used to customize the mapping,
351
and/or possibly provide an internationalized mapping for a non-Western character set.
354
<DT><B>Parameters:</B><DD><CODE>mapping</CODE> - Mapping string to use when finding the corresponding code for a given character<DT><B>Since:</B></DT>
359
<!-- ============ METHOD DETAIL ========== -->
361
<A NAME="method_detail"><!-- --></A>
362
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
363
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
364
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
365
<B>Method Detail</B></FONT></TH>
369
<A NAME="difference(java.lang.String, java.lang.String)"><!-- --></A><H3>
372
public int <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.79"><B>difference</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s1,
373
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> s2)
374
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
376
<DD>Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This
377
return value ranges from 0 through 4: 0 indicates little or no similarity, and 4 indicates strong similarity or
384
<DT><B>Parameters:</B><DD><CODE>s1</CODE> - A String that will be encoded and compared.<DD><CODE>s2</CODE> - A String that will be encoded and compared.
385
<DT><B>Returns:</B><DD>The number of characters in the two encoded Strings that are the same from 0 to 4.
387
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - if an error occurs encoding one of the strings<DT><B>Since:</B></DT>
389
<DT><B>See Also:</B><DD><CODE>SoundexUtils.difference(StringEncoder,String,String)</CODE>,
390
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS
391
T-SQL DIFFERENCE </a></DL>
396
<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
399
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.146"><B>encode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> pObject)
400
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
402
<DD>Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of
403
the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
406
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html#encode(java.lang.Object)">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/Encoder.html" title="interface in org.apache.commons.codec">Encoder</A></CODE></DL>
409
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to encode
410
<DT><B>Returns:</B><DD>An object (or type java.lang.String) containing the soundex code which corresponds to the String
413
<DD><CODE><A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></CODE> - if the parameter supplied is not of type java.lang.String
414
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if a character is not mapped</DL>
419
<A NAME="encode(java.lang.String)"><!-- --></A><H3>
422
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.162"><B>encode</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> pString)</PRE>
424
<DD>Encodes a String using the soundex algorithm.
427
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/commons/codec/StringEncoder.html#encode(java.lang.String)">encode</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/commons/codec/StringEncoder.html" title="interface in org.apache.commons.codec">StringEncoder</A></CODE></DL>
430
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - A String object to encode
431
<DT><B>Returns:</B><DD>A Soundex code corresponding to the String supplied
433
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if a character is not mapped</DL>
438
<A NAME="getMaxLength()"><!-- --></A><H3>
441
public int <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.202"><B>getMaxLength</B></A>()</PRE>
443
<DD><B>Deprecated.</B> <I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I>
445
<DD>Returns the maxLength. Standard Soundex
452
<DT><B>Returns:</B><DD>int</DL>
457
<A NAME="setMaxLength(int)"><!-- --></A><H3>
460
public void <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.239"><B>setMaxLength</B></A>(int maxLength)</PRE>
462
<DD><B>Deprecated.</B> <I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I>
464
<DD>Sets the maxLength.
470
<DT><B>Parameters:</B><DD><CODE>maxLength</CODE> - The maxLength to set</DL>
475
<A NAME="soundex(java.lang.String)"><!-- --></A><H3>
478
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/commons/codec/language/Soundex.html#line.252"><B>soundex</B></A>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> str)</PRE>
480
<DD>Retrieves the Soundex code for a given String object.
486
<DT><B>Parameters:</B><DD><CODE>str</CODE> - String to encode using the Soundex algorithm
487
<DT><B>Returns:</B><DD>A soundex code for the String supplied
489
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if a character is not mapped</DL>
492
<!-- ========= END OF CLASS DATA ========= -->
496
<!-- ======= START OF BOTTOM NAVBAR ====== -->
497
<A NAME="navbar_bottom"><!-- --></A>
498
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
499
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
501
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
502
<A NAME="navbar_bottom_firstrow"><!-- --></A>
503
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
504
<TR ALIGN="center" VALIGN="top">
505
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
506
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
507
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
508
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Soundex.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
509
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
510
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
511
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
512
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
516
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
522
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
523
<A HREF="../../../../../org/apache/commons/codec/language/RefinedSoundex.html" title="class in org.apache.commons.codec.language"><B>PREV CLASS</B></A>
524
NEXT CLASS</FONT></TD>
525
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
526
<A HREF="../../../../../index.html?org/apache/commons/codec/language/Soundex.html" target="_top"><B>FRAMES</B></A>
527
<A HREF="Soundex.html" target="_top"><B>NO FRAMES</B></A>
528
<SCRIPT type="text/javascript">
531
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
536
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
543
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
544
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
545
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
546
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
549
<A NAME="skip-navbar_bottom"></A>
550
<!-- ======== END OF BOTTOM NAVBAR ======= -->
553
Copyright © 2002-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.