URL.openConnection() instead.
Please visit this webpage
for further details.@Deprecated public class Soundex extends java.lang.Object implements StringEncoder
| Modifier and Type | Field and Description |
|---|---|
static Soundex |
US_ENGLISH
Deprecated.
An instance of Soundex using the US_ENGLISH_MAPPING mapping.
|
static char[] |
US_ENGLISH_MAPPING
Deprecated.
This is a default mapping of the 26 letters used in US English.
|
static java.lang.String |
US_ENGLISH_MAPPING_STRING
Deprecated.
This is a default mapping of the 26 letters used in US English.
|
| Constructor and Description |
|---|
Soundex()
Deprecated.
Creates an instance using US_ENGLISH_MAPPING
|
Soundex(char[] mapping)
Deprecated.
Creates a soundex instance using the given mapping.
|
| Modifier and Type | Method and Description |
|---|---|
int |
difference(java.lang.String s1,
java.lang.String s2)
Deprecated.
Encodes the Strings and returns the number of characters in the two encoded Strings that are the same.
|
java.lang.Object |
encode(java.lang.Object pObject)
Deprecated.
Encodes an Object using the soundex algorithm.
|
java.lang.String |
encode(java.lang.String pString)
Deprecated.
Encodes a String using the soundex algorithm.
|
int |
getMaxLength()
Deprecated.
This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
|
void |
setMaxLength(int maxLength)
Deprecated.
This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
|
java.lang.String |
soundex(java.lang.String str)
Deprecated.
Retreives the Soundex code for a given String object.
|
public static final Soundex US_ENGLISH
US_ENGLISH_MAPPINGpublic static final java.lang.String US_ENGLISH_MAPPING_STRING
0 for a letter position
means do not encode.
(This constant is provided as both an implementation convenience and to allow Javadoc to pick up the value for the constant values page.)
US_ENGLISH_MAPPING,
Constant Field Valuespublic static final char[] US_ENGLISH_MAPPING
0 for a letter position
means do not encode.Soundex(char[])public Soundex()
Soundex(char[]),
US_ENGLISH_MAPPINGpublic Soundex(char[] mapping)
mapping - Mapping array to use when finding the corresponding code for a given characterpublic int difference(java.lang.String s1,
java.lang.String s2)
throws EncoderException
s1 - A String that will be encoded and compared.s2 - A String that will be encoded and compared.EncoderException - if an error occurs encoding one of the stringspublic java.lang.Object encode(java.lang.Object pObject)
throws EncoderException
encode in interface EncoderpObject - Object to encodeEncoderException - if the parameter supplied is not of type java.lang.Stringjava.lang.IllegalArgumentException - if a character is not mappedpublic java.lang.String encode(java.lang.String pString)
encode in interface StringEncoderpString - A String object to encodejava.lang.IllegalArgumentException - if a character is not mappedpublic int getMaxLength()
public void setMaxLength(int maxLength)
maxLength - The maxLength to setpublic java.lang.String soundex(java.lang.String str)
str - String to encode using the Soundex algorithmjava.lang.IllegalArgumentException - if a character is not mapped