Documentation
¶
Index ¶
- func Distinct2[K, V any, Cmp comparable](seq iter.Seq2[K, V], f Function2[K, V, Cmp]) iter.Seq2[K, V]
- func Enumerate2[K, V any](seq iter.Seq2[K, V]) iter.Seq2[int, types.Pair[K, V]]
- func Filter2[K, V any](seq iter.Seq2[K, V], test Predicate2[K, V]) iter.Seq2[K, V]
- func MapKeys[K, V, R any](seq iter.Seq2[K, V], f Function2[K, V, R]) iter.Seq2[R, V]
- func MapValues[K, V, R any](seq iter.Seq2[K, V], f Function2[K, V, R]) iter.Seq2[K, R]
- func Peek2[K, V any](seq iter.Seq2[K, V], accept Consumer2[K, V]) iter.Seq2[K, V]
- type Comparator2
- type Consumer2
- type Function2
- type Predicate2
- type Seq2
- type Stream2
- type Supplier2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enumerate2 ¶ added in v1.6.6
Types ¶
type Comparator2 ¶
Comparator 比较两个元素. 第一个元素大于第二个元素时,返回正数; 第一个元素小于第二个元素时,返回负数; 否则返回 0.
type Seq2 ¶
func HashMapSeq2Of ¶ added in v1.6.5
func HashMapSeq2Of[K comparable, V any](m map[K]V) Seq2[K, V]
func SliceSeq2Of ¶ added in v1.6.5
type Stream2 ¶
type Stream2[K, V any] interface { Seq2() iter.Seq2[K, V] Filter(Predicate2[K, V]) Stream2[K, V] Peek(Consumer2[K, V]) Stream2[K, V] Distinct(Function2[K, V, int]) Stream2[K, V] SortedByKeys(Comparator[K]) Stream2[K, V] SortedByValues(Comparator[V]) Stream2[K, V] Limit(int64) Stream2[K, V] Skip(int64) Stream2[K, V] ForEach(Consumer2[K, V]) CollectKeys() []K CollectValues() []V AllMatch(Predicate2[K, V]) bool NoneMatch(Predicate2[K, V]) bool AnyMatch(Predicate2[K, V]) bool First() (K, V) Count() int64 }
Click to show internal directories.
Click to hide internal directories.