iter-list.go: implemented the Typer interface
This commit is contained in:
parent
fe5c8e9619
commit
0170baa0f5
@ -85,6 +85,10 @@ func (it *ListIterator) String() string {
|
||||
return fmt.Sprintf("$(#%d)", l)
|
||||
}
|
||||
|
||||
func (it *ListIterator) TypeName() string {
|
||||
return "ListIterator"
|
||||
}
|
||||
|
||||
func (it *ListIterator) HasOperation(name string) bool {
|
||||
yes := name == resetName || name == indexName || name == countName
|
||||
return yes
|
||||
|
@ -22,6 +22,7 @@ const (
|
||||
)
|
||||
|
||||
type Iterator interface {
|
||||
Typer
|
||||
Next() (item any, err error) // must return io.EOF after the last item
|
||||
Current() (item any, err error)
|
||||
Index() int
|
||||
|
Loading…
Reference in New Issue
Block a user