public class EventSequenceComparator extends Object implements IRangeComparator
Constructor and Description |
---|
EventSequenceComparator(List<EventSequence> esList) |
Modifier and Type | Method and Description |
---|---|
EventSequence |
getItem(int idx) |
int |
getRangeCount()
Returns the number of comparable entities.
|
boolean |
rangesEqual(int idx,
IRangeComparator rc2,
int idx2)
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).
|
public EventSequenceComparator(List<EventSequence> esList)
public int getRangeCount()
IRangeComparator
getRangeCount
in interface IRangeComparator
public boolean rangesEqual(int idx, IRangeComparator rc2, int idx2)
IRangeComparator
IRangeComparator
and index.rangesEqual
in interface IRangeComparator
idx
- the index of the comparable entity within this
IRangeComparator
rc2
- the IRangeComparator to compare this withidx2
- the index of the comparable entity within the other
IRangeComparator
true
if the comparable entities are equalpublic boolean skipRangeComparison(int length, int maxLength, IRangeComparator other)
IRangeComparator
skipRangeComparison
in interface IRangeComparator
length
- a number on which to base the decision whether to return
true
or false
maxLength
- another number on which to base the decision whether to
return true
or false
other
- the other IRangeComparator
to compare withtrue
to avoid a too lengthy range comparisonpublic EventSequence getItem(int idx)
Copyright © 2007-2014. All Rights Reserved.