1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/pkg/runtime/collections/collection.go

26 lines
479 B
Go
Raw Normal View History

2018-09-18 22:42:38 +02:00
package collections
import (
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
)
2018-09-18 22:42:38 +02:00
type (
Collection interface {
Length() values.Int
}
IndexedCollection interface {
Collection
Get(idx values.Int) core.Value
Set(idx values.Int, value core.Value) error
}
KeyedCollection interface {
Collection
Keys() []string
Get(key values.String) (core.Value, values.Boolean)
Set(key values.String, value core.Value)
}
)