java.lang.Object | |
↳ | org.apache.commons.codec.language.DoubleMetaphone |
Encodes a string into a double metaphone value. This Implementation is based on the algorithm by Lawrence Philips.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DoubleMetaphone.DoubleMetaphoneResult | Inner class for storing results, since there is the optional alternate encoding. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
maxCodeLen | Maximum length of an encoding, default is 4 |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an instance of this DoubleMetaphone encoder
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Encode a value with Double Metaphone, optionally using the alternate
encoding.
| |||||||||||
Encode a value with Double Metaphone
| |||||||||||
Encode the value using DoubleMetaphone.
| |||||||||||
Encode the value using DoubleMetaphone.
| |||||||||||
Returns the maxCodeLen.
| |||||||||||
Check if the Double Metaphone values of two
String values
are equal. | |||||||||||
Check if the Double Metaphone values of two
String values
are equal, optionally using the alternate value. | |||||||||||
Sets the maxCodeLen.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the character at index
index if available, otherwise
it returns Character.MIN_VALUE so that there is some sort
of a default
| |||||||||||
Determines whether
value contains any of the criteria starting at index start and
matching up to length length
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.commons.codec.Encoder
| |||||||||||
From interface
org.apache.commons.codec.StringEncoder
|
Maximum length of an encoding, default is 4
Creates an instance of this DoubleMetaphone encoder
Encode a value with Double Metaphone, optionally using the alternate encoding.
value | String to encode |
---|---|
alternate | use alternate encode |
Encode a value with Double Metaphone
value | String to encode |
---|
Encode the value using DoubleMetaphone. It will only work if
obj
is a String
(like Metaphone
).
obj | Object to encode (should be of type String) |
---|
EncoderException | encode parameter is not of type String |
---|
Encode the value using DoubleMetaphone.
value | String to encode |
---|
Returns the maxCodeLen.
Check if the Double Metaphone values of two String
values
are equal.
value1 | The left-hand side of the encoded equals(Object) . |
---|---|
value2 | The right-hand side of the encoded equals(Object) . |
true
if the encoded String
s are equal;
false
otherwise.Check if the Double Metaphone values of two String
values
are equal, optionally using the alternate value.
value1 | The left-hand side of the encoded equals(Object) . |
---|---|
value2 | The right-hand side of the encoded equals(Object) . |
alternate | use the alternate value if true . |
true
if the encoded String
s are equal;
false
otherwise.
Sets the maxCodeLen.
maxCodeLen | The maxCodeLen to set |
---|
Gets the character at index index
if available, otherwise
it returns Character.MIN_VALUE
so that there is some sort
of a default
Determines whether value
contains any of the criteria starting at index start
and
matching up to length length