public class FrameComparisonWidgetImpl extends Object implements FrameComparisonWidget
FrameComparisonWidget for pairs of FrameType.ROW_BASED frames.
Comparison logic in this class is very similar to RowKeyComparator, but is different because it works
on Frames instead of byte[].| Modifier and Type | Method and Description |
|---|---|
int |
compare(int row,
FrameComparisonWidget otherWidget,
int otherRow)
Compare a specific row of this frame to a specific row of another frame.
|
int |
compare(int row,
RowKey key)
Compare a specific row of this frame to the provided key.
|
static FrameComparisonWidgetImpl |
create(Frame frame,
FrameReader frameReader,
List<SortColumn> sortColumns)
Create a
FrameComparisonWidget for the given frame. |
RowKey |
readKey(int row)
Returns the
RowKey corresponding to a particular row. |
public static FrameComparisonWidgetImpl create(Frame frame, FrameReader frameReader, List<SortColumn> sortColumns)
FrameComparisonWidget for the given frame.
Only possible for frames of type FrameType.ROW_BASED. The provided sortColumns must be a prefix
of FrameReader.signature().frame - frame, must be FrameType.ROW_BASEDframeReader - reader for the framesortColumns - columns to sort bypublic RowKey readKey(int row)
FrameComparisonWidgetRowKey corresponding to a particular row. The returned key is a copy that does
not reference memory of the underlying Frame.readKey in interface FrameComparisonWidgetpublic int compare(int row,
RowKey key)
FrameComparisonWidgetcompare in interface FrameComparisonWidgetpublic int compare(int row,
FrameComparisonWidget otherWidget,
int otherRow)
FrameComparisonWidgetFrameSort to sort frames in-place.compare in interface FrameComparisonWidgetCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.