⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soundex.html

📁 java编码的一个开发包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
               int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used internally by the SoundEx algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#getMaxLength()">getMaxLength</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;char[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#getSoundexMapping()">getSoundexMapping</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the soundex mapping.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;char</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#map(char)">map</A></B>(char&nbsp;ch)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Maps the given upper-case character to it's Soudex code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#setMaxLength(int)">setMaxLength</A></B>(int&nbsp;maxLength)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#setSoundexMapping(char[])">setSoundexMapping</A></B>(char[]&nbsp;soundexMapping)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the soundexMapping.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<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/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;str)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retreives the Soundex code for a given String object.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="US_ENGLISH"><!-- --></A><H3>
US_ENGLISH</H3>
<PRE>
public static final <A HREF="../../../../../org/apache/commons/codec/language/Soundex.html" title="class in org.apache.commons.codec.language">Soundex</A> <B>US_ENGLISH</B></PRE>
<DL>
<DD>An instance of Soundex using the US_ENGLISH_MAPPING mapping.
<P>
<DL>
<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>
</DL>
<HR>

<A NAME="US_ENGLISH_MAPPING_STRING"><!-- --></A><H3>
US_ENGLISH_MAPPING_STRING</H3>
<PRE>
public static final <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>US_ENGLISH_MAPPING_STRING</B></PRE>
<DL>
<DD>This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position means do not encode. <p> (This constant is provided as both an implementation convenience and to allow Javadoc to pick up the value for the constant values page.) </p>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING"><CODE>US_ENGLISH_MAPPING</CODE></A>, <A HREF="../../../../../constant-values.html#org.apache.commons.codec.language.Soundex.US_ENGLISH_MAPPING_STRING">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="US_ENGLISH_MAPPING"><!-- --></A><H3>
US_ENGLISH_MAPPING</H3>
<PRE>
public static final char[] <B>US_ENGLISH_MAPPING</B></PRE>
<DL>
<DD>This is a default mapping of the 26 letters used in US English. A value of <code>0</code> for a letter position means do not encode.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(char[])"><CODE>Soundex(char[])</CODE></A></DL>
</DL>
<HR>

<A NAME="maxLength"><!-- --></A><H3>
maxLength</H3>
<PRE>
private int <B>maxLength</B></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>This feature is not needed since the encoding size must be constant. Will be removed in 2.0.</I>
<P>
<DD>The maximum length of a Soundex code - Soundex codes are only four characters by definition.
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="soundexMapping"><!-- --></A><H3>
soundexMapping</H3>
<PRE>
private char[] <B>soundexMapping</B></PRE>
<DL>
<DD>Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each letter is mapped. This implementation contains a default map for US_ENGLISH
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Soundex()"><!-- --></A><H3>
Soundex</H3>
<PRE>
public <B>Soundex</B>()</PRE>
<DL>
<DD>Creates an instance using US_ENGLISH_MAPPING
<P>
<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#Soundex(char[])"><CODE>Soundex(char[])</CODE></A>, <A HREF="../../../../../org/apache/commons/codec/language/Soundex.html#US_ENGLISH_MAPPING"><CODE>US_ENGLISH_MAPPING</CODE></A></DL>
<HR>

<A NAME="Soundex(char[])"><!-- --></A><H3>
Soundex</H3>
<PRE>
public <B>Soundex</B>(char[]&nbsp;mapping)</PRE>
<DL>
<DD>Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized mapping for a non-Western character set.  Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each letter is mapped. This implementation contains a default map for US_ENGLISH
<P>
<DT><B>Parameters:</B><DD><CODE>mapping</CODE> - Mapping array to use when finding the corresponding code for a given character</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="difference(java.lang.String, java.lang.String)"><!-- --></A><H3>
difference</H3>
<PRE>
public int <B>difference</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;s1,                      <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;s2)               throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
<DL>
<DD>Encodes the Strings and returns the number of characters in the two encoded Strings that are the same. This return value ranges from 0 through 4: 0 indicates little or no similarity, and 4 indicates strong similarity or identical values.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<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.<DT><B>Returns:</B><DD>The number of characters in the two encoded Strings that are the same from 0 to 4.<DT><B>Throws:</B><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>  <DD>1.3</DD><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/codec/language/SoundexUtils.html#difference(org.apache.commons.codec.StringEncoder, java.lang.String, java.lang.String)"><CODE>SoundexUtils.difference(StringEncoder,String,String)</CODE></A>, <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS          T-SQL DIFFERENCE </a></DL>
</DD>
</DL>
<HR>

<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
encode</H3>
<PRE>
public <A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>encode</B>(<A HREF="http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;pObject)              throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
<DL>
<DD>Encodes an Object using the soundex algorithm. This method is provided in order to satisfy the requirements of the Encoder interface, and will throw an EncoderException if the supplied object is not of type java.lang.String.
<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -