Documentation ¶
Overview ¶
Package dictionary creates a ValueDictionary data structure for the Item type
Index ¶
- type Key
- type Value
- type ValueDictionary
- func (d *ValueDictionary) Clear()
- func (d *ValueDictionary) Delete(k Key) bool
- func (d *ValueDictionary) Get(k Key) Value
- func (d *ValueDictionary) Has(k Key) bool
- func (d *ValueDictionary) Keys() []Key
- func (d *ValueDictionary) Set(k Key, v Value)
- func (d *ValueDictionary) Size() int
- func (d *ValueDictionary) Values() []Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValueDictionary ¶
type ValueDictionary struct {
// contains filtered or unexported fields
}
ValueDictionary the set of Items
func (*ValueDictionary) Clear ¶
func (d *ValueDictionary) Clear()
Clear removes all the items from the dictionary
func (*ValueDictionary) Delete ¶
func (d *ValueDictionary) Delete(k Key) bool
Delete removes a value from the dictionary, given its key
func (*ValueDictionary) Get ¶
func (d *ValueDictionary) Get(k Key) Value
Get returns the value associated with the key
func (*ValueDictionary) Has ¶
func (d *ValueDictionary) Has(k Key) bool
Has returns true if the key exists in the dictionary
func (*ValueDictionary) Keys ¶
func (d *ValueDictionary) Keys() []Key
Keys returns a slice of all the keys present
func (*ValueDictionary) Set ¶
func (d *ValueDictionary) Set(k Key, v Value)
Set adds a new item to the dictionary
func (*ValueDictionary) Size ¶
func (d *ValueDictionary) Size() int
Size returns the amount of elements in the dictionary
func (*ValueDictionary) Values ¶
func (d *ValueDictionary) Values() []Value
Values returns a slice of all the values present
Click to show internal directories.
Click to hide internal directories.