charAt
protected char charAt(java.lang.String value,
int index)
Gets the character at index index
if available, otherwise
it returns Character.MIN_VALUE
so that there is some sort
of a default
cleanInput
private String cleanInput(java.lang.String input)
Cleans the input
conditionC0
private boolean conditionC0(java.lang.String value,
int index)
Complex condition 0 for 'C'
conditionCH0
private boolean conditionCH0(java.lang.String value,
int index)
Complex condition 0 for 'CH'
conditionCH1
private boolean conditionCH1(java.lang.String value,
int index)
Complex condition 1 for 'CH'
conditionL0
private boolean conditionL0(java.lang.String value,
int index)
Complex condition 0 for 'L'
conditionM0
private boolean conditionM0(java.lang.String value,
int index)
Complex condition 0 for 'M'
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria)
Shortcut method with 1 criteria
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria1,
java.lang.String criteria2)
Shortcut method with 2 criteria
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria1,
java.lang.String criteria2,
java.lang.String criteria3)
Shortcut method with 3 criteria
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria1,
java.lang.String criteria2,
java.lang.String criteria3,
java.lang.String criteria4)
Shortcut method with 4 criteria
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria1,
java.lang.String criteria2,
java.lang.String criteria3,
java.lang.String criteria4,
java.lang.String criteria5)
Shortcut method with 5 criteria
contains
private static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String criteria1,
java.lang.String criteria2,
java.lang.String criteria3,
java.lang.String criteria4,
java.lang.String criteria5,
java.lang.String criteria6)
Shortcut method with 6 criteria
contains
protected static boolean contains(java.lang.String value,
int start,
int length,
java.lang.String[] criteria)
Determines whether value
contains any of the criteria
starting
at index start
and matching up to length length
doubleMetaphone
public String doubleMetaphone(java.lang.String value)
Encode a value with Double Metaphone
value
- String to encode
- an encoded string
doubleMetaphone
public String doubleMetaphone(java.lang.String value,
boolean alternate)
Encode a value with Double Metaphone, optionally using the alternate
encoding.
value
- String to encodealternate
- use alternate encode
- an encoded string
encode
public Object encode(Object obj)
throws EncoderException
Encode the value using DoubleMetaphone. It will only work if
obj
is a String
(like Metaphone
).
- encode in interface Encoder
obj
- Object to encode (should be of type String)
- An encoded Object (will be of type String)
EncoderException
- encode parameter is not of type String
encode
public String encode(java.lang.String value)
Encode the value using DoubleMetaphone.
- encode in interface StringEncoder
value
- String to encode
- An encoded String
getMaxCodeLen
public int getMaxCodeLen()
Returns the maxCodeLen.
- int
isDoubleMetaphoneEqual
public boolean isDoubleMetaphoneEqual(java.lang.String value1,
java.lang.String value2)
Check if the Double Metaphone values of two String
values
are equal.
value1
- The left-hand side of the encoded String.equals(Object)
.value2
- The right-hand side of the encoded String.equals(Object)
.
true
if the encoded String
s are equal;
false
otherwise.
isDoubleMetaphoneEqual(String,String,boolean)
isDoubleMetaphoneEqual
public boolean isDoubleMetaphoneEqual(java.lang.String value1,
java.lang.String value2,
boolean alternate)
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 String.equals(Object)
.value2
- The right-hand side of the encoded String.equals(Object)
.alternate
- use the alternate value if true
.
true
if the encoded String
s are equal;
false
otherwise.
isSilentStart
private boolean isSilentStart(java.lang.String value)
Determines whether or not the value starts with a silent letter. It will
return true
if the value starts with any of 'GN', 'KN',
'PN', 'WR' or 'PS'.
isSlavoGermanic
private boolean isSlavoGermanic(java.lang.String value)
Determines whether or not a value is of slavo-germanic orgin. A value is
of slavo-germanic origin if it contians any of 'W', 'K', 'CZ', or 'WITZ'.
isVowel
private boolean isVowel(char ch)
Determines whether or not a character is a vowel or not
setMaxCodeLen
public void setMaxCodeLen(int maxCodeLen)
Sets the maxCodeLen.
maxCodeLen
- The maxCodeLen to set