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(length int) *ByteRuneMap
MakeByteRuneMap creates new ByteRuneMap of given length.
func NewByteRuneMap(m map[byte]rune) *ByteRuneMap
NewByteRuneMap creates new ByteRuneMap on the base of provided input map.
func (m *ByteRuneMap) Length() int
Length gets the Length of the map.
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 (m *ByteRuneMap) Read(b byte) (rune, bool)
Read reads the map value for the key 'b'.
func (m *ByteRuneMap) Write(b byte, r rune)
Write the input entry {byte,rune} into the map.
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(length int) *RuneByteMap
MakeRuneByteMap creates new RuneByteMap of given length.
func (m *RuneByteMap) Length() int
Length gets the Length of the map.
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 (m *RuneByteMap) Read(r rune) (byte, bool)
Read reads the map value by the 'r' key.
func (m *RuneByteMap) Write(r rune, b byte)
Write writes the {rune,byte} pair into the map.
RuneSet is a asynchronously safe set where the key is a 'rune'.
type RuneSet struct {
// contains filtered or unexported fields
}
func MakeRuneSet(length int) *RuneSet
MakeRuneSet creates a RuneSet with provided length.
func (m *RuneSet) Exists(r rune) bool
Exists checks if the value for given key 'r' exists in the map.
func (m *RuneSet) Length() int
Length gets the length of given map.
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 (m *RuneSet) Write(r rune)
Write the key 'r' into given map.
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(m map[rune]string) *RuneStringMap
NewRuneStringMap creates new RuneStringMap on the base of input map.
func (m *RuneStringMap) Length() int
Length gets the length of given map.
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 (m *RuneStringMap) Read(r rune) (string, bool)
Read the value from the map for the key 'r'.
func (m *RuneStringMap) Write(r rune, s string)
Write the input entry {rune,string} into given map.
RuneUint16Map is a asynchronously safe map with 'rune' key and value 'GID'.
type RuneUint16Map struct {
// contains filtered or unexported fields
}
func MakeRuneUint16Map(length int) *RuneUint16Map
MakeRuneUint16Map creates new RuneUint16Map with given length.
func (m *RuneUint16Map) Delete(r rune)
Delete the entry from the map with the key 'r'.
func (m *RuneUint16Map) Length() int
Length gets the length of the map.
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 (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 (m *RuneUint16Map) Read(r rune) (uint16, bool)
Read gets the map value at the key rune 'r'.
func (m *RuneUint16Map) Write(r rune, g uint16)
Write writes the entry {rune,GID} into the map.
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(m map[string]rune) *StringRuneMap
NewStringRuneMap creates a new StringRuneMap created on base of input map.
func (m *StringRuneMap) Length() int
Length gets length of the map.
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 (m *StringRuneMap) Read(g string) (rune, bool)
Read the value from the map with given key 'b'.
func (m *StringRuneMap) Write(g string, r rune)
Write the input entry {string,rune} into given map.
StringsMap is a asynchronously safe map where the key and value is 'string'.
type StringsMap struct {
// contains filtered or unexported fields
}
func NewStringsMap(tuples []StringsTuple) *StringsMap
NewStringsMap creates new StringsMap on the base of input map.
func (m *StringsMap) Copy() *StringsMap
Copy creates a copy of the strings map.
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 (m *StringsMap) Read(g string) (string, bool)
Read gets the value from the map with the key 'g'.
func (m *StringsMap) Write(g1, g2 string)
Write the input entry {string,string} into given map.
StringsTuple is a tuple of strings.
type StringsTuple struct { Key, Value string }