public class ArgumentComparator extends Object implements IAtomSplitter
| Constructor and Description |
|---|
ArgumentComparator(String s) |
| Modifier and Type | Method and Description |
|---|---|
Atom |
getAtom(int i) |
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 ArgumentComparator(String s)
public 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 comparisonpublic String substring(int startAtom, int endAtom)
substring in interface IAtomSplitterpublic String substring(int startAtom)
substring in interface IAtomSplitterCopyright © 2022. All rights reserved.