summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/objects/iterator.go
blob: 01522ba599d30e2e96ebb08fad1a2a68fa91ba06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package objects

// Iterator represents an iterator for underlying data type.
type Iterator interface {
	Object

	// Next returns true if there are more elements to iterate.
	Next() bool

	// Key returns the key or index value of the current element.
	Key() Object

	// Value returns the value of the current element.
	Value() Object
}