MCPcopy
hub / github.com/emirpasic/gods / EnumerableWithIndex

Interface EnumerableWithIndex

containers/enumerable.go:8–31  ·  view source on GitHub ↗

EnumerableWithIndex provides functions for ordered containers whose values can be fetched by an index.

Source from the content-addressed store, hash-verified

6
7// EnumerableWithIndex provides functions for ordered containers whose values can be fetched by an index.
8type EnumerableWithIndex interface {
9 // Each calls the given function once for each element, passing that element's index and value.
10 Each(func(index int, value interface{}))
11
12 // Map invokes the given function once for each element and returns a
13 // container containing the values returned by the given function.
14 // Map(func(index int, value interface{}) interface{}) Container
15
16 // Select returns a new container containing all elements for which the given function returns a true value.
17 // Select(func(index int, value interface{}) bool) Container
18
19 // Any passes each element of the container to the given function and
20 // returns true if the function ever returns true for any element.
21 Any(func(index int, value interface{}) bool) bool
22
23 // All passes each element of the container to the given function and
24 // returns true if the function returns true for all elements.
25 All(func(index int, value interface{}) bool) bool
26
27 // Find passes each element of the container to the given function and returns
28 // the first (index,value) for which the function is true or -1,nil otherwise
29 // if no element matches the criteria.
30 Find(func(index int, value interface{}) bool) (int, interface{})
31}
32
33// EnumerableWithKey provides functions for ordered containers whose values whose elements are key/value pairs.
34type EnumerableWithKey interface {

Callers

nothing calls this directly

Implementers 8

Mapmaps/treebidimap/treebidimap.go
Mapmaps/linkedhashmap/linkedhashmap.go
Mapmaps/treemap/treemap.go
Listlists/doublylinkedlist/doublylinkedlis
Listlists/arraylist/arraylist.go
Listlists/singlylinkedlist/singlylinkedlis
Setsets/treeset/treeset.go
Setsets/linkedhashset/linkedhashset.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…