public final class NYSIIS extends Object implements Serializable
| Constructor and Description |
|---|
NYSIIS() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encode(String originalWord) |
static String |
extendedEncode(String trim) |
static boolean |
isEncodeEqual(String s1,
String s2)
Check if the two strings encode to the same primary or alternate encodings
using the Nysiis algorithm.
|
static void |
replaceAll(StringBuilder word,
String find,
String repl)
Replace all occurances of the given pattern in the string to be encoded
with the given replacement.
|
static void |
replaceAll(StringBuilder word,
String find,
String repl,
int startPos)
Replace all occurances of the given pattern in the string to be encoded
with the given replacement, beginning at the given staring position.
|
static void |
replaceAll(StringBuilder word,
String find,
String repl,
int startPos,
int endPos)
Replace all occurances of the given pattern in the string to be encoded
with the given replacement, beginning at the given staring position up to
the given end position.
|
static String |
soundex(String s) |
public static void replaceAll(StringBuilder word, String find, String repl)
word - the original stringbuilder instance of the wordfind - the sequence to locaterepl - the string to replace it withpublic static void replaceAll(StringBuilder word, String find, String repl, int startPos)
word - the original stringbuilder instance of the wordfind - the sequence to locaterepl - the string to replace it withstartPos - the position to begin atpublic static void replaceAll(StringBuilder word, String find, String repl, int startPos, int endPos)
word - the original stringbuilder instance of the wordfind - the sequence to locaterepl - the string to replace it withstartPos - the position to begin atendPos - the position to stop atpublic static boolean isEncodeEqual(String s1, String s2)
s1 - s2 - Copyright © 2021. All rights reserved.