Table of Contents

Interface ISortableReportGroupKey

Namespace
Cryville.EEW.Report
Assembly
Cryville.EEW.dll
Represents a sortable report group key.
public interface ISortableReportGroupKey : IReportGroupKey

Methods

CompareTo(ISortableReportGroupKey)

Compares the group key with another group key and returns an integer that indicates whether the current group key precedes, follows, or occurs in the same position in the sort order as the other group key.
int CompareTo(ISortableReportGroupKey obj)

Parameters

obj ISortableReportGroupKey
The other group key.

Returns

int
A value that indicates the relative order of the group keys being compared. Negative if the current group key precedes obj, zero if they occurs in the same position, or positive if the current group key follows obj.

Remarks

For any group key, among a list where all the group keys are sorted with this method, there must be at most one consecutive subsequence where all the groups keys pre-match with that group key, and all the other group keys in the list must not pre-match with that group key.

Match(ISortableReportGroupKey)

Matches against another group key.
bool Match(ISortableReportGroupKey obj)

Parameters

obj ISortableReportGroupKey
The other group key.

Returns

bool
Whether the two group keys match.

Remarks

Report groups with any matching group keys are grouped together.

PreMatch(ISortableReportGroupKey)

Pre-matches against another group key.
bool PreMatch(ISortableReportGroupKey obj)

Parameters

obj ISortableReportGroupKey
The other group key.

Returns

bool
Whether the two group keys pre-match, to potentially actually match.

Remarks

Implement this method so that it returns only based on the conditions used in CompareTo(ISortableReportGroupKey). For example, if CompareTo(ISortableReportGroupKey) only takes the event time into account, then implement this method so that it also only takes the event time into account, returns true if the two group keys potentially match, and returns false if they can never match.

Among a list where all the group keys are sorted with CompareTo(ISortableReportGroupKey), there must be at most one consecutive subsequence where all the groups keys pre-match with this group key, and all the other group keys in the list must not pre-match with this group key.