Sorted Key Value Sequence
Represents a sequence of key-value pairs that are sorted by key. This class provides operations for working with sorted sequences like mapping values, grouping and joining.
Example:
val sequence = sequenceOf(1 to "a", 2 to "b", 3 to "c").assertSorted()
Parameters
The type of keys in the sequence, must be comparable
The type of values in the sequence
Properties
Functions
Creates a SortedKeyValueSequence from this sequence, asserting that elements are sorted by their key.
Creates a SortedSequence from this sequence, asserting that elements are sorted according to their natural order.
Creates a SortedSequence from this sequence, asserting that elements are sorted by the given key selector.
Returns a new sequence containing only the first occurrence of each key.
Filters key-value pairs based on their key using the provided filter function.
Filters key-value pairs based on their value using the provided filter function.
Performs a full outer join with another sorted sequence using default pairing of values.
Performs a full outer join with another sorted sequence.
Performs a full outer zip with another sorted sequence using default pairing of values.
Performs a full outer zip with another sorted sequence.
Groups values by their keys, maintaining sort order.
Performs an inner join with another sorted sequence using default pairing of values.
Performs an inner join with another sorted sequence.
Performs an inner zip with another sorted sequence using default pairing of values.
Performs an inner zip with another sorted sequence.
Interleaves key-value pairs from this sequence with those from another sequence while maintaining sort order.
Performs a join between two sorted sequences based on matching keys.
Returns an iterator over the key-value pairs in this sequence while verifying the sort order.
Performs a left outer join with another sorted sequence using default pairing of values.
Performs a left outer join with another sorted sequence.
Performs a left outer zip with another sorted sequence using default pairing of values.
Performs a left outer zip with another sorted sequence.
Performs a right outer join with another sorted sequence using default pairing of values.
Performs a right outer join with another sorted sequence.
Performs a right outer zip with another sorted sequence using default pairing of values.
Performs a right outer zip with another sorted sequence.
Zips the sequence with another sorted sequence using default pairing of values.
Zips this sequence with another sorted sequence based on matching keys.