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
Caverphone (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="Caverphone (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/Caverphone.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
PREV CLASS
60
<A HREF="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><B>NEXT CLASS</B></A></FONT></TD>
61
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62
<A HREF="../../../../../index.html?org/apache/commons/codec/language/Caverphone.html" target="_top"><B>FRAMES</B></A>
63
<A HREF="Caverphone.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 | FIELD | <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: FIELD | <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.Caverphone</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/Caverphone.html#line.35"><B>Caverphone</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 Caverphone value.
110
This is an algorithm created the Caversham Project at the University of Otago. It implements the Caverphone 2.0
116
<DT><B>Since:</B></DT>
118
<DT><B>Version:</B></DT>
119
<DD>$Id: Caverphone.java 797690 2009-07-24 23:28:35Z ggregory $</DD>
120
<DT><B>Author:</B></DT>
121
<DD>Apache Software Foundation</DD>
122
<DT><B>See Also:</B><DD><a href="http://en.wikipedia.org/wiki/Caverphone">Wikipedia - Caverphone</a>,
123
<a href="http://caversham.otago.ac.nz/files/working/ctp150804.pdf">Caverphone 2.0 specification</a></DL>
128
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
130
<A NAME="constructor_summary"><!-- --></A>
131
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
133
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
134
<B>Constructor Summary</B></FONT></TH>
136
<TR BGCOLOR="white" CLASS="TableRowColor">
137
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Caverphone.html#Caverphone()">Caverphone</A></B>()</CODE>
140
Creates an instance of the Caverphone encoder</TD>
144
<!-- ========== METHOD SUMMARY =========== -->
146
<A NAME="method_summary"><!-- --></A>
147
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
148
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
149
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
150
<B>Method Summary</B></FONT></TH>
152
<TR BGCOLOR="white" CLASS="TableRowColor">
153
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154
<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>
155
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Caverphone.html#caverphone(java.lang.String)">caverphone</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> txt)</CODE>
158
Find the caverphone value of a String.</TD>
160
<TR BGCOLOR="white" CLASS="TableRowColor">
161
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162
<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>
163
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Caverphone.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>
166
Encodes an Object using the caverphone algorithm.</TD>
168
<TR BGCOLOR="white" CLASS="TableRowColor">
169
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
170
<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>
171
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Caverphone.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>
174
Encodes a String using the Caverphone algorithm.</TD>
176
<TR BGCOLOR="white" CLASS="TableRowColor">
177
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
178
<CODE> boolean</CODE></FONT></TD>
179
<TD><CODE><B><A HREF="../../../../../org/apache/commons/codec/language/Caverphone.html#isCaverphoneEqual(java.lang.String, java.lang.String)">isCaverphoneEqual</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> str1,
180
<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> str2)</CODE>
183
Tests if the caverphones of two strings are identical.</TD>
186
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
187
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
189
<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>
191
<TR BGCOLOR="white" CLASS="TableRowColor">
192
<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>
198
<!-- ========= CONSTRUCTOR DETAIL ======== -->
200
<A NAME="constructor_detail"><!-- --></A>
201
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
204
<B>Constructor Detail</B></FONT></TH>
208
<A NAME="Caverphone()"><!-- --></A><H3>
211
public <A HREF="../../../../../src-html/org/apache/commons/codec/language/Caverphone.html#line.40"><B>Caverphone</B></A>()</PRE>
213
<DD>Creates an instance of the Caverphone encoder
217
<!-- ============ METHOD DETAIL ========== -->
219
<A NAME="method_detail"><!-- --></A>
220
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
221
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
222
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
223
<B>Method Detail</B></FONT></TH>
227
<A NAME="caverphone(java.lang.String)"><!-- --></A><H3>
230
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/Caverphone.html#line.50"><B>caverphone</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> txt)</PRE>
232
<DD>Find the caverphone value of a String.
238
<DT><B>Parameters:</B><DD><CODE>txt</CODE> - String to find the caverphone code for
239
<DT><B>Returns:</B><DD>A caverphone code corresponding to the String supplied</DL>
244
<A NAME="encode(java.lang.Object)"><!-- --></A><H3>
247
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/Caverphone.html#line.154"><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)
248
throws <A HREF="../../../../../org/apache/commons/codec/EncoderException.html" title="class in org.apache.commons.codec">EncoderException</A></PRE>
250
<DD>Encodes an Object using the caverphone algorithm. This method
251
is provided in order to satisfy the requirements of the
252
Encoder interface, and will throw an EncoderException if the
253
supplied object is not of type java.lang.String.
256
<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>
259
<DT><B>Parameters:</B><DD><CODE>pObject</CODE> - Object to encode
260
<DT><B>Returns:</B><DD>An object (or type java.lang.String) containing the
261
caverphone code which corresponds to the String supplied.
263
<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
264
of type java.lang.String</DL>
269
<A NAME="encode(java.lang.String)"><!-- --></A><H3>
272
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/Caverphone.html#line.167"><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>
274
<DD>Encodes a String using the Caverphone algorithm.
277
<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>
280
<DT><B>Parameters:</B><DD><CODE>pString</CODE> - String object to encode
281
<DT><B>Returns:</B><DD>The caverphone code corresponding to the String supplied</DL>
286
<A NAME="isCaverphoneEqual(java.lang.String, java.lang.String)"><!-- --></A><H3>
287
isCaverphoneEqual</H3>
289
public boolean <A HREF="../../../../../src-html/org/apache/commons/codec/language/Caverphone.html#line.179"><B>isCaverphoneEqual</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> str1,
290
<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> str2)</PRE>
292
<DD>Tests if the caverphones of two strings are identical.
298
<DT><B>Parameters:</B><DD><CODE>str1</CODE> - First of two strings to compare<DD><CODE>str2</CODE> - Second of two strings to compare
299
<DT><B>Returns:</B><DD><code>true</code> if the caverphones of these strings are identical,
300
<code>false</code> otherwise.</DL>
303
<!-- ========= END OF CLASS DATA ========= -->
307
<!-- ======= START OF BOTTOM NAVBAR ====== -->
308
<A NAME="navbar_bottom"><!-- --></A>
309
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
310
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
312
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
313
<A NAME="navbar_bottom_firstrow"><!-- --></A>
314
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
315
<TR ALIGN="center" VALIGN="top">
316
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
317
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
318
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
319
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Caverphone.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
320
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
321
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
322
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
323
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
327
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
333
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
334
PREV CLASS
335
<A HREF="../../../../../org/apache/commons/codec/language/DoubleMetaphone.html" title="class in org.apache.commons.codec.language"><B>NEXT CLASS</B></A></FONT></TD>
336
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
337
<A HREF="../../../../../index.html?org/apache/commons/codec/language/Caverphone.html" target="_top"><B>FRAMES</B></A>
338
<A HREF="Caverphone.html" target="_top"><B>NO FRAMES</B></A>
339
<SCRIPT type="text/javascript">
342
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
347
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
354
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
355
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
356
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
357
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
360
<A NAME="skip-navbar_bottom"></A>
361
<!-- ======== END OF BOTTOM NAVBAR ======= -->
364
Copyright © 2002-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.