public abstract class SearchDistanceObject extends SearchComparator
String
it is better to use SearchDistance
.Constructor and Description |
---|
SearchDistanceObject(com.orchestranetworks.schema.SchemaNode schemaNode,
Locale locale) |
Modifier and Type | Method and Description |
---|---|
abstract float |
getDistance(Object baseObject,
Object otherObject)
Returns the distance between two objects.
|
boolean |
isNullSupported()
Null value must be supported.
|
String |
normalizeValue(String value)
Normalizes the value before any comparison.
|
cloneMatching, equals, getLocale, getParameter, getSchemaNode, hashCode, isDateSupported, isFullTableScanRequired, isNumericSupported, setParameter
public SearchDistanceObject(com.orchestranetworks.schema.SchemaNode schemaNode, Locale locale)
public final String normalizeValue(String value)
SearchComparator
value
is changed into lower-case.
Can be overridden in subclasses to change this default behavior.normalizeValue
in class SearchComparator
IllegalStateException
- in all cases, this method must not be called.public final boolean isNullSupported()
isNullSupported
in class SearchComparator
public abstract float getDistance(Object baseObject, Object otherObject)
baseObject
to be compared with otherObject
, the percentage of similarity will be calculated as follow.