Interface FrameComparisonWidget

All Known Implementing Classes:
FrameComparisonWidgetImpl

public interface FrameComparisonWidget
Wraps a Frame and provides ways to compare rows of that frame to various other things. Not thread-safe.
  • Method Summary

    Modifier and Type
    Method
    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.
    boolean
    hasNonNullKeyParts(int row, int[] keyParts)
    Whether particular key parts in a particular row are non-null.
    readKey(int row)
    Returns the RowKey corresponding to a particular row.
  • Method Details

    • readKey

      RowKey readKey(int row)
      Returns the RowKey corresponding to a particular row. The returned key is a copy that does not reference memory of the underlying Frame.
    • hasNonNullKeyParts

      boolean hasNonNullKeyParts(int row, int[] keyParts)
      Whether particular key parts in a particular row are non-null.
      Parameters:
      row - row number
      keyParts - parts to check
    • compare

      int compare(int row, RowKey key)
      Compare a specific row of this frame to the provided key. The key must have been created with sortColumns that match the ones used to create this widget, or else results are undefined. Comparison considers null to be equal to null. Callers that need to determine if key parts are null (perhaps because they *don't* want to consider null to be equal to null) should use hasNonNullKeyParts(int, int[]) to check the relevant parts.
    • compare

      int compare(int row, FrameComparisonWidget otherWidget, int otherRow)
      Compare a specific row of this frame to a specific row of another frame. The other frame must have the same sort key, or else results are undefined. The other frame may be the same object as this frame; for example, this is used by FrameSort to sort frames in-place. Comparison considers null to be equal to null. Callers that need to determine if key parts are null (perhaps because they *don't* want to consider null to be equal to null) should use hasNonNullKeyParts(int, int[]) to check the relevant parts.