orderedmap

package
v0.23.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyType

type KeyType generic.Type

type KeyTypeValueTypeOrderedMap

type KeyTypeValueTypeOrderedMap struct {
	// contains filtered or unexported fields
}

KeyTypeValueTypeOrderedMap

func NewKeyTypeValueTypeOrderedMap

func NewKeyTypeValueTypeOrderedMap() *KeyTypeValueTypeOrderedMap

NewKeyTypeValueTypeOrderedMap creates a new KeyTypeValueTypeOrderedMap.

func (*KeyTypeValueTypeOrderedMap) Clear added in v0.14.1

func (om *KeyTypeValueTypeOrderedMap) Clear()

Clear removes all entries from this ordered map.

func (*KeyTypeValueTypeOrderedMap) Delete

func (om *KeyTypeValueTypeOrderedMap) Delete(key KeyType) (oldValue ValueType, present bool)

Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.

func (*KeyTypeValueTypeOrderedMap) Foreach

func (om *KeyTypeValueTypeOrderedMap) Foreach(f func(key KeyType, value ValueType))

Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.

func (*KeyTypeValueTypeOrderedMap) ForeachWithError added in v0.19.0

func (om *KeyTypeValueTypeOrderedMap) ForeachWithError(f func(key KeyType, value ValueType) error) error

ForeachWithError iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair. If the passed function returns an error, iteration breaks and the error is returned.

func (*KeyTypeValueTypeOrderedMap) Get

func (om *KeyTypeValueTypeOrderedMap) Get(key KeyType) (result ValueType, present bool)

Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.

func (*KeyTypeValueTypeOrderedMap) GetPair

GetPair returns the key-value pair associated with the given key. Returns nil if not found.

func (*KeyTypeValueTypeOrderedMap) Len

func (om *KeyTypeValueTypeOrderedMap) Len() int

Len returns the length of the ordered map.

func (*KeyTypeValueTypeOrderedMap) Newest

Newest returns a pointer to the newest pair.

func (*KeyTypeValueTypeOrderedMap) Oldest

Oldest returns a pointer to the oldest pair.

func (*KeyTypeValueTypeOrderedMap) Set

func (om *KeyTypeValueTypeOrderedMap) Set(key KeyType, value ValueType) (oldValue ValueType, present bool)

Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.

type KeyTypeValueTypePair

type KeyTypeValueTypePair struct {
	Key   KeyType
	Value ValueType
	// contains filtered or unexported fields
}

KeyTypeValueTypePair

func (*KeyTypeValueTypePair) Next

Next returns a pointer to the next pair.

func (*KeyTypeValueTypePair) Prev

Prev returns a pointer to the previous pair.

type StringInterfaceOrderedMap

type StringInterfaceOrderedMap struct {
	// contains filtered or unexported fields
}

StringInterfaceOrderedMap

func NewStringInterfaceOrderedMap

func NewStringInterfaceOrderedMap() *StringInterfaceOrderedMap

NewStringInterfaceOrderedMap creates a new StringInterfaceOrderedMap.

func (*StringInterfaceOrderedMap) Clear added in v0.14.1

func (om *StringInterfaceOrderedMap) Clear()

Clear removes all entries from this ordered map.

func (*StringInterfaceOrderedMap) Delete

func (om *StringInterfaceOrderedMap) Delete(key string) (oldValue interface{}, present bool)

Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.

func (*StringInterfaceOrderedMap) Foreach

func (om *StringInterfaceOrderedMap) Foreach(f func(key string, value interface{}))

Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.

func (*StringInterfaceOrderedMap) ForeachWithError added in v0.19.0

func (om *StringInterfaceOrderedMap) ForeachWithError(f func(key string, value interface{}) error) error

ForeachWithError iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair. If the passed function returns an error, iteration breaks and the error is returned.

func (*StringInterfaceOrderedMap) Get

func (om *StringInterfaceOrderedMap) Get(key string) (result interface{}, present bool)

Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.

func (*StringInterfaceOrderedMap) GetPair

GetPair returns the key-value pair associated with the given key. Returns nil if not found.

func (*StringInterfaceOrderedMap) Len

func (om *StringInterfaceOrderedMap) Len() int

Len returns the length of the ordered map.

func (*StringInterfaceOrderedMap) Newest

Newest returns a pointer to the newest pair.

func (*StringInterfaceOrderedMap) Oldest

Oldest returns a pointer to the oldest pair.

func (*StringInterfaceOrderedMap) Set

func (om *StringInterfaceOrderedMap) Set(key string, value interface{}) (oldValue interface{}, present bool)

Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.

type StringInterfacePair

type StringInterfacePair struct {
	Key   string
	Value interface{}
	// contains filtered or unexported fields
}

StringInterfacePair

func (*StringInterfacePair) Next

Next returns a pointer to the next pair.

func (*StringInterfacePair) Prev

Prev returns a pointer to the previous pair.

type StringStringOrderedMap

type StringStringOrderedMap struct {
	// contains filtered or unexported fields
}

StringStringOrderedMap

func NewStringStringOrderedMap

func NewStringStringOrderedMap() *StringStringOrderedMap

NewStringStringOrderedMap creates a new StringStringOrderedMap.

func (*StringStringOrderedMap) Clear added in v0.14.1

func (om *StringStringOrderedMap) Clear()

Clear removes all entries from this ordered map.

func (*StringStringOrderedMap) Delete

func (om *StringStringOrderedMap) Delete(key string) (oldValue string, present bool)

Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.

func (*StringStringOrderedMap) Foreach

func (om *StringStringOrderedMap) Foreach(f func(key string, value string))

Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.

func (*StringStringOrderedMap) ForeachWithError added in v0.19.0

func (om *StringStringOrderedMap) ForeachWithError(f func(key string, value string) error) error

ForeachWithError iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair. If the passed function returns an error, iteration breaks and the error is returned.

func (*StringStringOrderedMap) Get

func (om *StringStringOrderedMap) Get(key string) (result string, present bool)

Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.

func (*StringStringOrderedMap) GetPair

GetPair returns the key-value pair associated with the given key. Returns nil if not found.

func (*StringStringOrderedMap) Len

func (om *StringStringOrderedMap) Len() int

Len returns the length of the ordered map.

func (*StringStringOrderedMap) Newest

Newest returns a pointer to the newest pair.

func (*StringStringOrderedMap) Oldest

Oldest returns a pointer to the oldest pair.

func (*StringStringOrderedMap) Set

func (om *StringStringOrderedMap) Set(key string, value string) (oldValue string, present bool)

Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.

type StringStringPair

type StringStringPair struct {
	Key   string
	Value string
	// contains filtered or unexported fields
}

StringStringPair

func (*StringStringPair) Next

Next returns a pointer to the next pair.

func (*StringStringPair) Prev

Prev returns a pointer to the previous pair.

type StringStructOrderedMap added in v0.13.2

type StringStructOrderedMap struct {
	// contains filtered or unexported fields
}

StringStructOrderedMap

func NewStringStructOrderedMap added in v0.13.2

func NewStringStructOrderedMap() *StringStructOrderedMap

NewStringStructOrderedMap creates a new StringStructOrderedMap.

func (*StringStructOrderedMap) Clear added in v0.14.1

func (om *StringStructOrderedMap) Clear()

Clear removes all entries from this ordered map.

func (*StringStructOrderedMap) Delete added in v0.13.2

func (om *StringStructOrderedMap) Delete(key string) (oldValue struct{}, present bool)

Delete removes the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Delete`.

func (*StringStructOrderedMap) Foreach added in v0.13.2

func (om *StringStructOrderedMap) Foreach(f func(key string, value struct{}))

Foreach iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair.

func (*StringStructOrderedMap) ForeachWithError added in v0.19.0

func (om *StringStructOrderedMap) ForeachWithError(f func(key string, value struct{}) error) error

ForeachWithError iterates over the entries of the map in the insertion order, and invokes the provided function for each key-value pair. If the passed function returns an error, iteration breaks and the error is returned.

func (*StringStructOrderedMap) Get added in v0.13.2

func (om *StringStructOrderedMap) Get(key string) (result struct{}, present bool)

Get returns the value associated with the given key. Returns nil if not found. The second return value indicates if the key is present in the map.

func (*StringStructOrderedMap) GetPair added in v0.13.2

GetPair returns the key-value pair associated with the given key. Returns nil if not found.

func (*StringStructOrderedMap) Len added in v0.13.2

func (om *StringStructOrderedMap) Len() int

Len returns the length of the ordered map.

func (*StringStructOrderedMap) Newest added in v0.13.2

Newest returns a pointer to the newest pair.

func (*StringStructOrderedMap) Oldest added in v0.13.2

Oldest returns a pointer to the oldest pair.

func (*StringStructOrderedMap) Set added in v0.13.2

func (om *StringStructOrderedMap) Set(key string, value struct{}) (oldValue struct{}, present bool)

Set sets the key-value pair, and returns what `Get` would have returned on that key prior to the call to `Set`.

type StringStructPair added in v0.13.2

type StringStructPair struct {
	Key   string
	Value struct{}
	// contains filtered or unexported fields
}

StringStructPair

func (*StringStructPair) Next added in v0.13.2

Next returns a pointer to the next pair.

func (*StringStructPair) Prev added in v0.13.2

Prev returns a pointer to the previous pair.

type ValueType

type ValueType generic.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL