URL.openConnection()
instead.
Please visit this webpage
for further details.@Deprecated public class Metaphone extends java.lang.Object implements StringEncoder
Initial Java implementation by William B. Brogden. December, 1997. Permission given by wbrogden for code to be used anywhere.
Hanging on the Metaphone by Lawrence Philips in Computer Language of Dec. 1990, p 39.
Constructor and Description |
---|
Metaphone()
Deprecated.
Creates an instance of the Metaphone encoder
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
encode(java.lang.Object pObject)
Deprecated.
Encodes an Object using the metaphone algorithm.
|
java.lang.String |
encode(java.lang.String pString)
Deprecated.
Encodes a String using the Metaphone algorithm.
|
int |
getMaxCodeLen()
Deprecated.
Returns the maxCodeLen.
|
boolean |
isMetaphoneEqual(java.lang.String str1,
java.lang.String str2)
Deprecated.
Tests is the metaphones of two strings are identical.
|
java.lang.String |
metaphone(java.lang.String txt)
Deprecated.
Find the metaphone value of a String.
|
void |
setMaxCodeLen(int maxCodeLen)
Deprecated.
Sets the maxCodeLen.
|
public Metaphone()
public java.lang.String metaphone(java.lang.String txt)
txt
- String to find the metaphone code forpublic java.lang.Object encode(java.lang.Object pObject) throws EncoderException
encode
in interface Encoder
pObject
- Object to encodeEncoderException
- if the parameter supplied is not
of type java.lang.Stringpublic java.lang.String encode(java.lang.String pString)
encode
in interface StringEncoder
pString
- String object to encodepublic boolean isMetaphoneEqual(java.lang.String str1, java.lang.String str2)
str1
- First of two strings to comparestr2
- Second of two strings to comparepublic int getMaxCodeLen()
public void setMaxCodeLen(int maxCodeLen)
maxCodeLen
- The maxCodeLen to set