File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,15 +14,13 @@ type Collection[T any] interface {
1414 // Contains returns true if this collection contains the specified element.
1515 Contains (e T ) bool
1616
17- // ContainsAll returns true if this collection contains all of the elements in the specified collection.
17+ // ContainsAll returns true if this collection contains all of the elements in the specified
18+ // collection.
1819 ContainsAll (c ... T ) bool
1920
2021 // Equals compares this collection with the object pass from parameter.
2122 Equals (o any ) bool
2223
23- // ForEach performs the given handler for each elements in the collection until all elements have been processed or the handler returns an error.
24- ForEach (func (e T ) error ) error
25-
2624 // IsEmpty returns true if this collection contains no elements.
2725 IsEmpty () bool
2826
Original file line number Diff line number Diff line change 1+ package collection
2+
3+ type List [T any ] interface {
4+ Add (T )
5+
6+ AddAll (... T )
7+
8+ Insert (int , T )
9+ }
Original file line number Diff line number Diff line change @@ -6,4 +6,8 @@ type Set[T comparable] interface {
66
77 // Clone returns a copy of this set.
88 Clone () Set [T ]
9+
10+ // ForEach performs the given handler for each elements in the collection until all elements
11+ // have been processed or the handler returns an error.
12+ ForEach (func (e T ) error ) error
913}
You can’t perform that action at this time.
0 commit comments