public class TagComparator extends Object implements IAtomSplitter
| Constructor and Description |
|---|
TagComparator(BufferedReader in) |
TagComparator(String s) |
TagComparator(StringBuilder s) |
| Modifier and Type | Method and Description |
|---|---|
Atom |
getAtom(int i) |
List<Atom> |
getAtoms() |
int |
getRangeCount()
Returns the number of comparable entities.
|
boolean |
rangesEqual(int thisIndex,
IRangeComparator other,
int otherIndex)
Returns whether the comparable entity given by the first index matches an
entity specified by the other
IRangeComparator and index. |
boolean |
skipRangeComparison(int length,
int maxLength,
IRangeComparator other)
Returns whether a comparison should be skipped because it would be too
costly (or lengthy).
|
String |
substring(int startAtom) |
String |
substring(int startAtom,
int endAtom) |
public TagComparator(String s)
public TagComparator(StringBuilder s)
public TagComparator(BufferedReader in) throws IOException
IOExceptionpublic String substring(int startAtom, int endAtom)
substring in interface IAtomSplitterpublic String substring(int startAtom)
substring in interface IAtomSplitterpublic Atom getAtom(int i)
getAtom in interface IAtomSplitterpublic int getRangeCount()
IRangeComparatorgetRangeCount in interface IRangeComparatorpublic boolean rangesEqual(int thisIndex,
IRangeComparator other,
int otherIndex)
IRangeComparatorIRangeComparator and index.rangesEqual in interface IRangeComparatorthisIndex - the index of the comparable entity within this
IRangeComparatorother - the IRangeComparator to compare this withotherIndex - the index of the comparable entity within the other
IRangeComparatortrue if the comparable entities are equalpublic boolean skipRangeComparison(int length,
int maxLength,
IRangeComparator other)
IRangeComparatorskipRangeComparison in interface IRangeComparatorlength - a number on which to base the decision whether to return
true or falsemaxLength - another number on which to base the decision whether to
return true or falseother - the other IRangeComparator to compare withtrue to avoid a too lengthy range comparisonCopyright © 2022. All rights reserved.