Sorted Sequence
Represents a sequence of elements that are sorted by key. This class provides operations for working with sorted sequences like mapping values, grouping and joining.
Example:
val sequence = sequenceOf("az", "by", "cx").assertSortedBy { it.first() }
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.
Converts this SortedSequence to a SortedKeyValueSequence.
Returns a new sequence containing only the first occurrence of each key.
Filters the sequence to only include elements whose keys match the given predicate.
Filters the sequence to only include elements whose values match the given predicate.
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 sorting key, 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 elements from this sequence with those from another sequence while maintaining sort order.
Performs a join between two sorted sequences based on matching keys using default pairing of values.
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 the sequence with another sorted sequence based on matching keys.