public class StringComparator extends Object implements IRangeComparator
| Constructor and Description |
|---|
StringComparator(String paragraphContent) |
| Modifier and Type | Method and Description |
|---|---|
String |
getLeaf(int owni) |
double |
getMatchRatio(StringComparator other) |
int |
getRangeCount()
Returns the number of comparable entities.
|
boolean |
rangesEqual(int owni,
IRangeComparator otherComp,
int otheri)
Returns whether the comparable entity given by the first index matches an
entity specified by the other
IRangeComparator and index. |
boolean |
skipRangeComparison(int arg0,
int arg1,
IRangeComparator arg2)
Returns whether a comparison should be skipped because it would be too
costly (or lengthy).
|
public StringComparator(String paragraphContent)
public int getRangeCount()
IRangeComparatorgetRangeCount in interface IRangeComparatorpublic boolean rangesEqual(int owni,
IRangeComparator otherComp,
int otheri)
IRangeComparatorIRangeComparator and index.rangesEqual in interface IRangeComparatorowni - the index of the comparable entity within this
IRangeComparatorotherComp - the IRangeComparator to compare this withotheri - the index of the comparable entity within the other
IRangeComparatortrue if the comparable entities are equalpublic String getLeaf(int owni)
public boolean skipRangeComparison(int arg0,
int arg1,
IRangeComparator arg2)
IRangeComparatorskipRangeComparison in interface IRangeComparatorarg0 - a number on which to base the decision whether to return
true or falsearg1 - another number on which to base the decision whether to
return true or falsearg2 - the other IRangeComparator to compare withtrue to avoid a too lengthy range comparisonpublic double getMatchRatio(StringComparator other)
Copyright © 2007-2022. All Rights Reserved.