Klasse DoubleMetaphoneEncoder
java.lang.Object
org.xbib.interlibrary.catalog.matching.string.DoubleMetaphoneEncoder
- Alle implementierten Schnittstellen:
StringEncoder
DoubleMetaphone Java Implementation from the algorithm by Lawrence Philips.
- Original Article: http://www.cuj.com/documents/s=8038/cuj0006philips/
- Original Source Code: ftp://ftp.cuj.com/pub/2000/1806/philips.zip
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected char
Gets the character at indexindex
if available, otherwise it returnsCharacter.MIN_VALUE
so that there is some sort of a default.protected static boolean
Determines whethervalue
contains any of the criteria starting at indexstart
and matching up to lengthlength
.final String
Encode a value with Double Metaphone.protected String
Encode a value with Double Metaphone, optionally using the alternate encoding.int
Returns the maxCodeLen.boolean
isDoubleMetaphoneEqual
(String value1, String value2) Check if the Double Metaphone values of twoString
values are equal.boolean
isDoubleMetaphoneEqual
(String value1, String value2, boolean alternate) Check if the Double Metaphone values of twoString
values are equal, optionally using the alternate value.void
setMaxCodeLen
(int maxCodeLen) Sets the maxCodeLen.
-
Konstruktordetails
-
DoubleMetaphoneEncoder
public DoubleMetaphoneEncoder()
-
-
Methodendetails
-
encode
Encode a value with Double Metaphone.- Angegeben von:
encode
in SchnittstelleStringEncoder
- Parameter:
value
- String to encode- Gibt zurück:
- an encoded string
- Löst aus:
EncoderException
- if there is an error condition during the encoding process.
-
encode
Encode a value with Double Metaphone, optionally using the alternate encoding.- Parameter:
valueStr
- String to encodealternate
- use alternate encode- Gibt zurück:
- an encoded string
-
isDoubleMetaphoneEqual
Check if the Double Metaphone values of twoString
values are equal.- Parameter:
value1
- value1value2
- value2- Gibt zurück:
- true if equals
-
isDoubleMetaphoneEqual
Check if the Double Metaphone values of twoString
values are equal, optionally using the alternate value.- Parameter:
value1
- value1value2
- value2alternate
- alternate- Gibt zurück:
- true if equal
-
getMaxCodeLen
public int getMaxCodeLen()Returns the maxCodeLen.- Gibt zurück:
- int
-
setMaxCodeLen
public void setMaxCodeLen(int maxCodeLen) Sets the maxCodeLen.- Parameter:
maxCodeLen
- The maxCodeLen to set
-
charAt
Gets the character at indexindex
if available, otherwise it returnsCharacter.MIN_VALUE
so that there is some sort of a default.- Parameter:
value
- valueindex
- index- Gibt zurück:
- char
-
contains
Determines whethervalue
contains any of the criteria starting at indexstart
and matching up to lengthlength
.- Parameter:
value
- valuestart
- startlength
- lengthcriteria
- criteria- Gibt zurück:
- true
-