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()
IRangeComparator
getRangeCount
in interface IRangeComparator
public boolean rangesEqual(int owni, IRangeComparator otherComp, int otheri)
IRangeComparator
IRangeComparator
and index.rangesEqual
in interface IRangeComparator
owni
- the index of the comparable entity within this
IRangeComparator
otherComp
- the IRangeComparator to compare this withotheri
- the index of the comparable entity within the other
IRangeComparator
true
if the comparable entities are equalpublic String getLeaf(int owni)
public boolean skipRangeComparison(int arg0, int arg1, IRangeComparator arg2)
IRangeComparator
skipRangeComparison
in interface IRangeComparator
arg0
- a number on which to base the decision whether to return
true
or false
arg1
- another number on which to base the decision whether to
return true
or false
arg2
- the other IRangeComparator
to compare withtrue
to avoid a too lengthy range comparisonpublic double getMatchRatio(StringComparator other)
Copyright © 2007-2018. All Rights Reserved.