...

Package syncmap

Overview ▾

Index ▾

type ByteRuneMap
    func MakeByteRuneMap(length int) *ByteRuneMap
    func NewByteRuneMap(m map[byte]rune) *ByteRuneMap
    func (m *ByteRuneMap) Length() int
    func (m *ByteRuneMap) Range(f func(key byte, value rune) (breakLoop bool))
    func (m *ByteRuneMap) Read(b byte) (rune, bool)
    func (m *ByteRuneMap) Write(b byte, r rune)
type RuneByteMap
    func MakeRuneByteMap(length int) *RuneByteMap
    func (m *RuneByteMap) Length() int
    func (m *RuneByteMap) Range(f func(key rune, value byte) (breakLoop bool))
    func (m *RuneByteMap) Read(r rune) (byte, bool)
    func (m *RuneByteMap) Write(r rune, b byte)
type RuneSet
    func MakeRuneSet(length int) *RuneSet
    func (m *RuneSet) Exists(r rune) bool
    func (m *RuneSet) Length() int
    func (m *RuneSet) Range(f func(key rune) (breakLoop bool))
    func (m *RuneSet) Write(r rune)
type RuneStringMap
    func NewRuneStringMap(m map[rune]string) *RuneStringMap
    func (m *RuneStringMap) Length() int
    func (m *RuneStringMap) Range(f func(key rune, val string) (breakLoop bool))
    func (m *RuneStringMap) Read(r rune) (string, bool)
    func (m *RuneStringMap) Write(r rune, s string)
type RuneUint16Map
    func MakeRuneUint16Map(length int) *RuneUint16Map
    func (m *RuneUint16Map) Delete(r rune)
    func (m *RuneUint16Map) Length() int
    func (m *RuneUint16Map) Range(f func(key rune, value uint16) (breakLoop bool))
    func (m *RuneUint16Map) RangeDelete(f func(key rune, value uint16) (deleteEntry bool, breakLoop bool))
    func (m *RuneUint16Map) Read(r rune) (uint16, bool)
    func (m *RuneUint16Map) Write(r rune, g uint16)
type StringRuneMap
    func NewStringRuneMap(m map[string]rune) *StringRuneMap
    func (m *StringRuneMap) Length() int
    func (m *StringRuneMap) Range(f func(key string, val rune) (breakLoop bool))
    func (m *StringRuneMap) Read(g string) (rune, bool)
    func (m *StringRuneMap) Write(g string, r rune)
type StringsMap
    func NewStringsMap(tuples []StringsTuple) *StringsMap
    func (m *StringsMap) Copy() *StringsMap
    func (m *StringsMap) Range(f func(key, val string) (breakLoop bool))
    func (m *StringsMap) Read(g string) (string, bool)
    func (m *StringsMap) Write(g1, g2 string)
type StringsTuple

Package files

byte_rune.go rune_byte.go rune_set.go rune_string.go rune_uint16.go string_rune.go string_string.go

type ByteRuneMap

ByteRuneMap is a asynchronously safe map where the key is a 'byte' and the value is a 'rune'.

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

func MakeByteRuneMap

func MakeByteRuneMap(length int) *ByteRuneMap

MakeByteRuneMap creates new ByteRuneMap of given length.

func NewByteRuneMap

func NewByteRuneMap(m map[byte]rune) *ByteRuneMap

NewByteRuneMap creates new ByteRuneMap on the base of provided input map.

func (*ByteRuneMap) Length

func (m *ByteRuneMap) Length() int

Length gets the Length of the map.

func (*ByteRuneMap) Range

func (m *ByteRuneMap) Range(f func(key byte, value rune) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*ByteRuneMap) Read

func (m *ByteRuneMap) Read(b byte) (rune, bool)

Read reads the map value for the key 'b'.

func (*ByteRuneMap) Write

func (m *ByteRuneMap) Write(b byte, r rune)

Write the input entry {byte,rune} into the map.

type RuneByteMap

RuneByteMap is a asynchronously safe map where the key is a 'rune' and the value is a 'byte'.

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

func MakeRuneByteMap

func MakeRuneByteMap(length int) *RuneByteMap

MakeRuneByteMap creates new RuneByteMap of given length.

func (*RuneByteMap) Length

func (m *RuneByteMap) Length() int

Length gets the Length of the map.

func (*RuneByteMap) Range

func (m *RuneByteMap) Range(f func(key rune, value byte) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*RuneByteMap) Read

func (m *RuneByteMap) Read(r rune) (byte, bool)

Read reads the map value by the 'r' key.

func (*RuneByteMap) Write

func (m *RuneByteMap) Write(r rune, b byte)

Write writes the {rune,byte} pair into the map.

type RuneSet

RuneSet is a asynchronously safe set where the key is a 'rune'.

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

func MakeRuneSet

func MakeRuneSet(length int) *RuneSet

MakeRuneSet creates a RuneSet with provided length.

func (*RuneSet) Exists

func (m *RuneSet) Exists(r rune) bool

Exists checks if the value for given key 'r' exists in the map.

func (*RuneSet) Length

func (m *RuneSet) Length() int

Length gets the length of given map.

func (*RuneSet) Range

func (m *RuneSet) Range(f func(key rune) (breakLoop bool))

Range iterates over the whole map and operates on its keys using provided input function. If the result of the function is true the iteration breaks..

func (*RuneSet) Write

func (m *RuneSet) Write(r rune)

Write the key 'r' into given map.

type RuneStringMap

RuneStringMap is a asynchronously safe map where the key is a 'rune' and the value is a 'string'.

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

func NewRuneStringMap

func NewRuneStringMap(m map[rune]string) *RuneStringMap

NewRuneStringMap creates new RuneStringMap on the base of input map.

func (*RuneStringMap) Length

func (m *RuneStringMap) Length() int

Length gets the length of given map.

func (*RuneStringMap) Range

func (m *RuneStringMap) Range(f func(key rune, val string) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*RuneStringMap) Read

func (m *RuneStringMap) Read(r rune) (string, bool)

Read the value from the map for the key 'r'.

func (*RuneStringMap) Write

func (m *RuneStringMap) Write(r rune, s string)

Write the input entry {rune,string} into given map.

type RuneUint16Map

RuneUint16Map is a asynchronously safe map with 'rune' key and value 'GID'.

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

func MakeRuneUint16Map

func MakeRuneUint16Map(length int) *RuneUint16Map

MakeRuneUint16Map creates new RuneUint16Map with given length.

func (*RuneUint16Map) Delete

func (m *RuneUint16Map) Delete(r rune)

Delete the entry from the map with the key 'r'.

func (*RuneUint16Map) Length

func (m *RuneUint16Map) Length() int

Length gets the length of the map.

func (*RuneUint16Map) Range

func (m *RuneUint16Map) Range(f func(key rune, value uint16) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*RuneUint16Map) RangeDelete

func (m *RuneUint16Map) RangeDelete(f func(key rune, value uint16) (deleteEntry bool, breakLoop bool))

RangeDelete iterates over the whole map and operates on its 'key' - 'value' using provided input function. The input function should return two booleans. The first informs the loop to delete given entry.. Whereas the other tells to break it.

func (*RuneUint16Map) Read

func (m *RuneUint16Map) Read(r rune) (uint16, bool)

Read gets the map value at the key rune 'r'.

func (*RuneUint16Map) Write

func (m *RuneUint16Map) Write(r rune, g uint16)

Write writes the entry {rune,GID} into the map.

type StringRuneMap

StringRuneMap is a asynchronously safe map where the key is a 'string' and the value is a 'rune'.

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

func NewStringRuneMap

func NewStringRuneMap(m map[string]rune) *StringRuneMap

NewStringRuneMap creates a new StringRuneMap created on base of input map.

func (*StringRuneMap) Length

func (m *StringRuneMap) Length() int

Length gets length of the map.

func (*StringRuneMap) Range

func (m *StringRuneMap) Range(f func(key string, val rune) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*StringRuneMap) Read

func (m *StringRuneMap) Read(g string) (rune, bool)

Read the value from the map with given key 'b'.

func (*StringRuneMap) Write

func (m *StringRuneMap) Write(g string, r rune)

Write the input entry {string,rune} into given map.

type StringsMap

StringsMap is a asynchronously safe map where the key and value is 'string'.

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

func NewStringsMap

func NewStringsMap(tuples []StringsTuple) *StringsMap

NewStringsMap creates new StringsMap on the base of input map.

func (*StringsMap) Copy

func (m *StringsMap) Copy() *StringsMap

Copy creates a copy of the strings map.

func (*StringsMap) Range

func (m *StringsMap) Range(f func(key, val string) (breakLoop bool))

Range iterates over the whole map and operates on its 'key' - 'value' using provided input function. If the result of the function is true the iteration breaks.

func (*StringsMap) Read

func (m *StringsMap) Read(g string) (string, bool)

Read gets the value from the map with the key 'g'.

func (*StringsMap) Write

func (m *StringsMap) Write(g1, g2 string)

Write the input entry {string,string} into given map.

type StringsTuple

StringsTuple is a tuple of strings.

type StringsTuple struct {
    Key, Value string
}