xgo/objects/iterator.go

16 lines
336 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package objects
// Iterator represents an iterator for underlying data type.
2019-01-09 10:17:42 +03:00
type Iterator interface {
Object
// Next returns true if there are more elements to iterate.
2019-01-09 10:17:42 +03:00
Next() bool
// Key returns the key or index value of the current element.
2019-01-09 10:17:42 +03:00
Key() Object
// Value returns the value of the current element.
2019-01-09 10:17:42 +03:00
Value() Object
}