Documentation ¶
Overview ¶
Package treeset implements a Tree backed by a red-black Tree.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package treeset implements a Tree backed by a red-black Tree.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package treemap implements a map backed by red-black Tree.
Elements are ordered by key in the map.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Associative_array
Package treemap implements a map backed by red-black Tree.
Elements are ordered by key in the map.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Associative_array
Package treeset implements a Tree backed by a red-black Tree.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package treeset implements a Tree backed by a red-black Tree.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Package treeset implements a Tree backed by a red-black Tree.
Structure is not thread safe.
Reference: http://en.wikipedia.org/wiki/Set_%28abstract_data_type%29
Index ¶
- func AccountDeltaSetIntersection(a *AccountDeltaSet, b *AccountDeltaSet, ...)
- func AccountNameSetIntersection(a *AccountNameSet, b *AccountNameSet, callback func(elem common.AccountName))
- func NamePairSetIntersection(a *NamePairSet, b *NamePairSet, callback func(elem common.NamePair))
- func PermissionLevelSetIntersection(a *PermissionLevelSet, b *PermissionLevelSet, ...)
- func PublicKeySetIntersection(a *PublicKeySet, b *PublicKeySet, callback func(elem ecc.PublicKey))
- type AccountDeltaSet
- func (set *AccountDeltaSet) Add(items ...common.AccountDelta)
- func (set *AccountDeltaSet) AddItem(item common.AccountDelta) (bool, common.AccountDelta)
- func (set *AccountDeltaSet) Begin() IteratorAccountDeltaSet
- func (set *AccountDeltaSet) Contains(items ...common.AccountDelta) bool
- func (set *AccountDeltaSet) Each(f func(value common.AccountDelta))
- func (set *AccountDeltaSet) End() IteratorAccountDeltaSet
- func (set *AccountDeltaSet) Find(f func(value common.AccountDelta) bool) (v common.AccountDelta)
- func (set *AccountDeltaSet) Iterator() IteratorAccountDeltaSet
- func (set *AccountDeltaSet) LowerBound(item common.AccountDelta) IteratorAccountDeltaSet
- func (set AccountDeltaSet) MarshalJSON() ([]byte, error)
- func (set AccountDeltaSet) Pack() (re []byte, err error)
- func (set *AccountDeltaSet) Remove(items ...common.AccountDelta)
- func (set *AccountDeltaSet) String() string
- func (set *AccountDeltaSet) UnmarshalJSON(data []byte) error
- func (set *AccountDeltaSet) Unpack(in []byte) (int, error)
- func (set *AccountDeltaSet) UpperBound(item common.AccountDelta) IteratorAccountDeltaSet
- func (set *AccountDeltaSet) Values() []common.AccountDelta
- type AccountNameSet
- func (set *AccountNameSet) Add(items ...common.AccountName)
- func (set *AccountNameSet) AddItem(item common.AccountName) (bool, common.AccountName)
- func (set *AccountNameSet) Begin() IteratorAccountNameSet
- func (set *AccountNameSet) Contains(items ...common.AccountName) bool
- func (set *AccountNameSet) Each(f func(value common.AccountName))
- func (set *AccountNameSet) End() IteratorAccountNameSet
- func (set *AccountNameSet) Find(f func(value common.AccountName) bool) (v common.AccountName)
- func (set *AccountNameSet) Iterator() IteratorAccountNameSet
- func (set *AccountNameSet) LowerBound(item common.AccountName) IteratorAccountNameSet
- func (set AccountNameSet) MarshalJSON() ([]byte, error)
- func (set AccountNameSet) Pack() (re []byte, err error)
- func (set *AccountNameSet) Remove(items ...common.AccountName)
- func (set *AccountNameSet) String() string
- func (set *AccountNameSet) UnmarshalJSON(data []byte) error
- func (set *AccountNameSet) Unpack(in []byte) (int, error)
- func (set *AccountNameSet) UpperBound(item common.AccountName) IteratorAccountNameSet
- func (set *AccountNameSet) Values() []common.AccountName
- type AccountNameUint32Map
- func (m *AccountNameUint32Map) Begin() IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Each(f func(key common.AccountName, value uint32))
- func (m *AccountNameUint32Map) End() IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Find(f func(key common.AccountName, value uint32) bool) (k common.AccountName, v uint32)
- func (m *AccountNameUint32Map) Get(key common.AccountName) IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Insert(key common.AccountName, value uint32) IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Iterator() IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Keys() []common.AccountName
- func (m *AccountNameUint32Map) LowerBound(key common.AccountName) IteratorAccountNameUint32Map
- func (m AccountNameUint32Map) MarshalJSON() ([]byte, error)
- func (m AccountNameUint32Map) Pack() (re []byte, err error)
- func (m *AccountNameUint32Map) Put(key common.AccountName, value uint32)
- func (m *AccountNameUint32Map) Remove(key common.AccountName)
- func (m AccountNameUint32Map) String() string
- func (m *AccountNameUint32Map) UnmarshalJSON(data []byte) error
- func (m *AccountNameUint32Map) Unpack(in []byte) (int, error)
- func (m *AccountNameUint32Map) UpperBound(key common.AccountName) IteratorAccountNameUint32Map
- func (m *AccountNameUint32Map) Values() []uint32
- type AccountNameUint64Map
- func (m *AccountNameUint64Map) Begin() IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Each(f func(key common.AccountName, value uint64))
- func (m *AccountNameUint64Map) End() IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Find(f func(key common.AccountName, value uint64) bool) (k common.AccountName, v uint64)
- func (m *AccountNameUint64Map) Get(key common.AccountName) IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Insert(key common.AccountName, value uint64) IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Iterator() IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Keys() []common.AccountName
- func (m *AccountNameUint64Map) LowerBound(key common.AccountName) IteratorAccountNameUint64Map
- func (m AccountNameUint64Map) MarshalJSON() ([]byte, error)
- func (m AccountNameUint64Map) Pack() (re []byte, err error)
- func (m *AccountNameUint64Map) Put(key common.AccountName, value uint64)
- func (m *AccountNameUint64Map) Remove(key common.AccountName)
- func (m AccountNameUint64Map) String() string
- func (m *AccountNameUint64Map) UnmarshalJSON(data []byte) error
- func (m *AccountNameUint64Map) Unpack(in []byte) (int, error)
- func (m *AccountNameUint64Map) UpperBound(key common.AccountName) IteratorAccountNameUint64Map
- func (m *AccountNameUint64Map) Values() []uint64
- type IteratorAccountDeltaSet
- type IteratorAccountNameSet
- type IteratorAccountNameUint32Map
- type IteratorAccountNameUint64Map
- type IteratorNamePairSet
- type IteratorPermissionLevelSet
- type IteratorPublicKeySet
- type NamePairSet
- func (set *NamePairSet) Add(items ...common.NamePair)
- func (set *NamePairSet) AddItem(item common.NamePair) (bool, common.NamePair)
- func (set *NamePairSet) Begin() IteratorNamePairSet
- func (set *NamePairSet) Contains(items ...common.NamePair) bool
- func (set *NamePairSet) Each(f func(value common.NamePair))
- func (set *NamePairSet) End() IteratorNamePairSet
- func (set *NamePairSet) Find(f func(value common.NamePair) bool) (v common.NamePair)
- func (set *NamePairSet) Iterator() IteratorNamePairSet
- func (set *NamePairSet) LowerBound(item common.NamePair) IteratorNamePairSet
- func (set NamePairSet) MarshalJSON() ([]byte, error)
- func (set NamePairSet) Pack() (re []byte, err error)
- func (set *NamePairSet) Remove(items ...common.NamePair)
- func (set *NamePairSet) String() string
- func (set *NamePairSet) UnmarshalJSON(data []byte) error
- func (set *NamePairSet) Unpack(in []byte) (int, error)
- func (set *NamePairSet) UpperBound(item common.NamePair) IteratorNamePairSet
- func (set *NamePairSet) Values() []common.NamePair
- type PermissionLevelSet
- func (set *PermissionLevelSet) Add(items ...common.PermissionLevel)
- func (set *PermissionLevelSet) AddItem(item common.PermissionLevel) (bool, common.PermissionLevel)
- func (set *PermissionLevelSet) Begin() IteratorPermissionLevelSet
- func (set *PermissionLevelSet) Contains(items ...common.PermissionLevel) bool
- func (set *PermissionLevelSet) Each(f func(value common.PermissionLevel))
- func (set *PermissionLevelSet) End() IteratorPermissionLevelSet
- func (set *PermissionLevelSet) Find(f func(value common.PermissionLevel) bool) (v common.PermissionLevel)
- func (set *PermissionLevelSet) Iterator() IteratorPermissionLevelSet
- func (set *PermissionLevelSet) LowerBound(item common.PermissionLevel) IteratorPermissionLevelSet
- func (set PermissionLevelSet) MarshalJSON() ([]byte, error)
- func (set PermissionLevelSet) Pack() (re []byte, err error)
- func (set *PermissionLevelSet) Remove(items ...common.PermissionLevel)
- func (set *PermissionLevelSet) String() string
- func (set *PermissionLevelSet) UnmarshalJSON(data []byte) error
- func (set *PermissionLevelSet) Unpack(in []byte) (int, error)
- func (set *PermissionLevelSet) UpperBound(item common.PermissionLevel) IteratorPermissionLevelSet
- func (set *PermissionLevelSet) Values() []common.PermissionLevel
- type PublicKeySet
- func (set *PublicKeySet) Add(items ...ecc.PublicKey)
- func (set *PublicKeySet) AddItem(item ecc.PublicKey) (bool, ecc.PublicKey)
- func (set *PublicKeySet) Begin() IteratorPublicKeySet
- func (set *PublicKeySet) Contains(items ...ecc.PublicKey) bool
- func (set *PublicKeySet) Each(f func(value ecc.PublicKey))
- func (set *PublicKeySet) End() IteratorPublicKeySet
- func (set *PublicKeySet) Find(f func(value ecc.PublicKey) bool) (v ecc.PublicKey)
- func (set *PublicKeySet) Iterator() IteratorPublicKeySet
- func (set *PublicKeySet) LowerBound(item ecc.PublicKey) IteratorPublicKeySet
- func (set PublicKeySet) MarshalJSON() ([]byte, error)
- func (set PublicKeySet) Pack() (re []byte, err error)
- func (set *PublicKeySet) Remove(items ...ecc.PublicKey)
- func (set *PublicKeySet) String() string
- func (set *PublicKeySet) UnmarshalJSON(data []byte) error
- func (set *PublicKeySet) Unpack(in []byte) (int, error)
- func (set *PublicKeySet) UpperBound(item ecc.PublicKey) IteratorPublicKeySet
- func (set *PublicKeySet) Values() []ecc.PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountDeltaSetIntersection ¶
func AccountDeltaSetIntersection(a *AccountDeltaSet, b *AccountDeltaSet, callback func(elem common.AccountDelta))
func AccountNameSetIntersection ¶
func AccountNameSetIntersection(a *AccountNameSet, b *AccountNameSet, callback func(elem common.AccountName))
func NamePairSetIntersection ¶
func NamePairSetIntersection(a *NamePairSet, b *NamePairSet, callback func(elem common.NamePair))
func PermissionLevelSetIntersection ¶
func PermissionLevelSetIntersection(a *PermissionLevelSet, b *PermissionLevelSet, callback func(elem common.PermissionLevel))
func PublicKeySetIntersection ¶
func PublicKeySetIntersection(a *PublicKeySet, b *PublicKeySet, callback func(elem ecc.PublicKey))
Types ¶
type AccountDeltaSet ¶
Set holds elements in a red-black Tree
func CopyFromAccountDeltaSet ¶
func CopyFromAccountDeltaSet(ts *AccountDeltaSet) *AccountDeltaSet
func NewAccountDeltaSet ¶
func NewAccountDeltaSet(Value ...common.AccountDelta) *AccountDeltaSet
func (*AccountDeltaSet) Add ¶
func (set *AccountDeltaSet) Add(items ...common.AccountDelta)
Add adds the items (one or more) to the set.
func (*AccountDeltaSet) AddItem ¶
func (set *AccountDeltaSet) AddItem(item common.AccountDelta) (bool, common.AccountDelta)
Add adds the item one to the set.Returns false and the interface if it already exists
func (*AccountDeltaSet) Begin ¶
func (set *AccountDeltaSet) Begin() IteratorAccountDeltaSet
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*AccountDeltaSet) Contains ¶
func (set *AccountDeltaSet) Contains(items ...common.AccountDelta) bool
Contains checks weather items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*AccountDeltaSet) Each ¶
func (set *AccountDeltaSet) Each(f func(value common.AccountDelta))
Each calls the given function once for each element, passing that element's index and value.
func (*AccountDeltaSet) End ¶
func (set *AccountDeltaSet) End() IteratorAccountDeltaSet
End returns End Iterator
func (*AccountDeltaSet) Find ¶
func (set *AccountDeltaSet) Find(f func(value common.AccountDelta) bool) (v common.AccountDelta)
Find passes each element of the container to the given function and returns the first (index,value) for which the function is true or -1,nil otherwise if no element matches the criteria.
func (*AccountDeltaSet) Iterator ¶
func (set *AccountDeltaSet) Iterator() IteratorAccountDeltaSet
Iterator holding the iterator's state
func (*AccountDeltaSet) LowerBound ¶
func (set *AccountDeltaSet) LowerBound(item common.AccountDelta) IteratorAccountDeltaSet
func (AccountDeltaSet) MarshalJSON ¶
func (set AccountDeltaSet) MarshalJSON() ([]byte, error)
ToJSON outputs the JSON representation of the set.
func (AccountDeltaSet) Pack ¶
func (set AccountDeltaSet) Pack() (re []byte, err error)
func (*AccountDeltaSet) Remove ¶
func (set *AccountDeltaSet) Remove(items ...common.AccountDelta)
Remove removes the items (one or more) from the set.
func (*AccountDeltaSet) String ¶
func (set *AccountDeltaSet) String() string
String returns a string representation of container
func (*AccountDeltaSet) UnmarshalJSON ¶
func (set *AccountDeltaSet) UnmarshalJSON(data []byte) error
FromJSON populates the set from the input JSON representation.
func (*AccountDeltaSet) UpperBound ¶
func (set *AccountDeltaSet) UpperBound(item common.AccountDelta) IteratorAccountDeltaSet
func (*AccountDeltaSet) Values ¶
func (set *AccountDeltaSet) Values() []common.AccountDelta
Values returns all items in the set.
type AccountNameSet ¶
Set holds elements in a red-black Tree
func CopyFromAccountNameSet ¶
func CopyFromAccountNameSet(ts *AccountNameSet) *AccountNameSet
func NewAccountNameSet ¶
func NewAccountNameSet(Value ...common.AccountName) *AccountNameSet
func (*AccountNameSet) Add ¶
func (set *AccountNameSet) Add(items ...common.AccountName)
Add adds the items (one or more) to the set.
func (*AccountNameSet) AddItem ¶
func (set *AccountNameSet) AddItem(item common.AccountName) (bool, common.AccountName)
Add adds the item one to the set.Returns false and the interface if it already exists
func (*AccountNameSet) Begin ¶
func (set *AccountNameSet) Begin() IteratorAccountNameSet
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*AccountNameSet) Contains ¶
func (set *AccountNameSet) Contains(items ...common.AccountName) bool
Contains checks weather items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*AccountNameSet) Each ¶
func (set *AccountNameSet) Each(f func(value common.AccountName))
Each calls the given function once for each element, passing that element's index and value.
func (*AccountNameSet) End ¶
func (set *AccountNameSet) End() IteratorAccountNameSet
End returns End Iterator
func (*AccountNameSet) Find ¶
func (set *AccountNameSet) Find(f func(value common.AccountName) bool) (v common.AccountName)
Find passes each element of the container to the given function and returns the first (index,value) for which the function is true or -1,nil otherwise if no element matches the criteria.
func (*AccountNameSet) Iterator ¶
func (set *AccountNameSet) Iterator() IteratorAccountNameSet
Iterator holding the iterator's state
func (*AccountNameSet) LowerBound ¶
func (set *AccountNameSet) LowerBound(item common.AccountName) IteratorAccountNameSet
func (AccountNameSet) MarshalJSON ¶
func (set AccountNameSet) MarshalJSON() ([]byte, error)
ToJSON outputs the JSON representation of the set.
func (AccountNameSet) Pack ¶
func (set AccountNameSet) Pack() (re []byte, err error)
func (*AccountNameSet) Remove ¶
func (set *AccountNameSet) Remove(items ...common.AccountName)
Remove removes the items (one or more) from the set.
func (*AccountNameSet) String ¶
func (set *AccountNameSet) String() string
String returns a string representation of container
func (*AccountNameSet) UnmarshalJSON ¶
func (set *AccountNameSet) UnmarshalJSON(data []byte) error
FromJSON populates the set from the input JSON representation.
func (*AccountNameSet) UpperBound ¶
func (set *AccountNameSet) UpperBound(item common.AccountName) IteratorAccountNameSet
func (*AccountNameSet) Values ¶
func (set *AccountNameSet) Values() []common.AccountName
Values returns all items in the set.
type AccountNameUint32Map ¶
Map holds the elements in a red-black Tree
func CopyFromAccountNameUint32Map ¶
func CopyFromAccountNameUint32Map(tm *AccountNameUint32Map) *AccountNameUint32Map
func NewAccountNameUint32Map ¶
func NewAccountNameUint32Map() *AccountNameUint32Map
NewWith instantiates a Tree map with the custom comparator.
func (*AccountNameUint32Map) Begin ¶
func (m *AccountNameUint32Map) Begin() IteratorAccountNameUint32Map
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*AccountNameUint32Map) Each ¶
func (m *AccountNameUint32Map) Each(f func(key common.AccountName, value uint32))
Each calls the given function once for each element, passing that element's key and value.
func (*AccountNameUint32Map) End ¶
func (m *AccountNameUint32Map) End() IteratorAccountNameUint32Map
End returns End Iterator
func (*AccountNameUint32Map) Find ¶
func (m *AccountNameUint32Map) Find(f func(key common.AccountName, value uint32) bool) (k common.AccountName, v uint32)
Find passes each element of the container to the given function and returns the first (key,value) for which the function is true or nil,nil otherwise if no element matches the criteria.
func (*AccountNameUint32Map) Get ¶
func (m *AccountNameUint32Map) Get(key common.AccountName) IteratorAccountNameUint32Map
Get searches the element in the map by key and returns its value or nil if key is not found in Tree. Second return parameter is true if key was found, otherwise false. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*AccountNameUint32Map) Insert ¶
func (m *AccountNameUint32Map) Insert(key common.AccountName, value uint32) IteratorAccountNameUint32Map
func (*AccountNameUint32Map) Iterator ¶
func (m *AccountNameUint32Map) Iterator() IteratorAccountNameUint32Map
Iterator returns a stateful Iterator whose elements are key/value pairs.
func (*AccountNameUint32Map) Keys ¶
func (m *AccountNameUint32Map) Keys() []common.AccountName
Keys returns all keys in-order
func (*AccountNameUint32Map) LowerBound ¶
func (m *AccountNameUint32Map) LowerBound(key common.AccountName) IteratorAccountNameUint32Map
func (AccountNameUint32Map) MarshalJSON ¶
func (m AccountNameUint32Map) MarshalJSON() ([]byte, error)
func (AccountNameUint32Map) Pack ¶
func (m AccountNameUint32Map) Pack() (re []byte, err error)
func (*AccountNameUint32Map) Put ¶
func (m *AccountNameUint32Map) Put(key common.AccountName, value uint32)
Put inserts key-value pair into the map. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*AccountNameUint32Map) Remove ¶
func (m *AccountNameUint32Map) Remove(key common.AccountName)
Remove removes the element from the map by key. Key should adhere to the comparator's type assertion, otherwise method panics.
func (AccountNameUint32Map) String ¶
func (m AccountNameUint32Map) String() string
String returns a string representation of container
func (*AccountNameUint32Map) UnmarshalJSON ¶
func (m *AccountNameUint32Map) UnmarshalJSON(data []byte) error
FromJSON populates the map from the input JSON representation.
func (*AccountNameUint32Map) UpperBound ¶
func (m *AccountNameUint32Map) UpperBound(key common.AccountName) IteratorAccountNameUint32Map
func (*AccountNameUint32Map) Values ¶
func (m *AccountNameUint32Map) Values() []uint32
Values returns all values in-order based on the key.
type AccountNameUint64Map ¶
Map holds the elements in a red-black Tree
func CopyFromAccountNameUint64Map ¶
func CopyFromAccountNameUint64Map(tm *AccountNameUint64Map) *AccountNameUint64Map
func NewAccountNameUint64Map ¶
func NewAccountNameUint64Map() *AccountNameUint64Map
NewWith instantiates a Tree map with the custom comparator.
func (*AccountNameUint64Map) Begin ¶
func (m *AccountNameUint64Map) Begin() IteratorAccountNameUint64Map
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*AccountNameUint64Map) Each ¶
func (m *AccountNameUint64Map) Each(f func(key common.AccountName, value uint64))
Each calls the given function once for each element, passing that element's key and value.
func (*AccountNameUint64Map) End ¶
func (m *AccountNameUint64Map) End() IteratorAccountNameUint64Map
End returns End Iterator
func (*AccountNameUint64Map) Find ¶
func (m *AccountNameUint64Map) Find(f func(key common.AccountName, value uint64) bool) (k common.AccountName, v uint64)
Find passes each element of the container to the given function and returns the first (key,value) for which the function is true or nil,nil otherwise if no element matches the criteria.
func (*AccountNameUint64Map) Get ¶
func (m *AccountNameUint64Map) Get(key common.AccountName) IteratorAccountNameUint64Map
Get searches the element in the map by key and returns its value or nil if key is not found in Tree. Second return parameter is true if key was found, otherwise false. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*AccountNameUint64Map) Insert ¶
func (m *AccountNameUint64Map) Insert(key common.AccountName, value uint64) IteratorAccountNameUint64Map
func (*AccountNameUint64Map) Iterator ¶
func (m *AccountNameUint64Map) Iterator() IteratorAccountNameUint64Map
Iterator returns a stateful Iterator whose elements are key/value pairs.
func (*AccountNameUint64Map) Keys ¶
func (m *AccountNameUint64Map) Keys() []common.AccountName
Keys returns all keys in-order
func (*AccountNameUint64Map) LowerBound ¶
func (m *AccountNameUint64Map) LowerBound(key common.AccountName) IteratorAccountNameUint64Map
func (AccountNameUint64Map) MarshalJSON ¶
func (m AccountNameUint64Map) MarshalJSON() ([]byte, error)
func (AccountNameUint64Map) Pack ¶
func (m AccountNameUint64Map) Pack() (re []byte, err error)
func (*AccountNameUint64Map) Put ¶
func (m *AccountNameUint64Map) Put(key common.AccountName, value uint64)
Put inserts key-value pair into the map. Key should adhere to the comparator's type assertion, otherwise method panics.
func (*AccountNameUint64Map) Remove ¶
func (m *AccountNameUint64Map) Remove(key common.AccountName)
Remove removes the element from the map by key. Key should adhere to the comparator's type assertion, otherwise method panics.
func (AccountNameUint64Map) String ¶
func (m AccountNameUint64Map) String() string
String returns a string representation of container
func (*AccountNameUint64Map) UnmarshalJSON ¶
func (m *AccountNameUint64Map) UnmarshalJSON(data []byte) error
FromJSON populates the map from the input JSON representation.
func (*AccountNameUint64Map) UpperBound ¶
func (m *AccountNameUint64Map) UpperBound(key common.AccountName) IteratorAccountNameUint64Map
func (*AccountNameUint64Map) Values ¶
func (m *AccountNameUint64Map) Values() []uint64
Values returns all values in-order based on the key.
type IteratorAccountDeltaSet ¶
Iterator returns a stateful iterator whose values can be fetched by an index.
func (IteratorAccountDeltaSet) Value ¶
func (iterator IteratorAccountDeltaSet) Value() common.AccountDelta
Value returns the current element's value. Does not modify the state of the iterator.
type IteratorAccountNameSet ¶
Iterator returns a stateful iterator whose values can be fetched by an index.
func (IteratorAccountNameSet) Value ¶
func (iterator IteratorAccountNameSet) Value() common.AccountName
Value returns the current element's value. Does not modify the state of the iterator.
type IteratorAccountNameUint32Map ¶
Iterator holding the Iterator's state
func (IteratorAccountNameUint32Map) Key ¶
func (iterator IteratorAccountNameUint32Map) Key() common.AccountName
Key returns the current element's key. Does not modify the state of the Iterator.
func (IteratorAccountNameUint32Map) Value ¶
func (iterator IteratorAccountNameUint32Map) Value() uint32
Value returns the current element's value. Does not modify the state of the Iterator.
type IteratorAccountNameUint64Map ¶
Iterator holding the Iterator's state
func (IteratorAccountNameUint64Map) Key ¶
func (iterator IteratorAccountNameUint64Map) Key() common.AccountName
Key returns the current element's key. Does not modify the state of the Iterator.
func (IteratorAccountNameUint64Map) Value ¶
func (iterator IteratorAccountNameUint64Map) Value() uint64
Value returns the current element's value. Does not modify the state of the Iterator.
type IteratorNamePairSet ¶
Iterator returns a stateful iterator whose values can be fetched by an index.
func (IteratorNamePairSet) Value ¶
func (iterator IteratorNamePairSet) Value() common.NamePair
Value returns the current element's value. Does not modify the state of the iterator.
type IteratorPermissionLevelSet ¶
Iterator returns a stateful iterator whose values can be fetched by an index.
func (IteratorPermissionLevelSet) Value ¶
func (iterator IteratorPermissionLevelSet) Value() common.PermissionLevel
Value returns the current element's value. Does not modify the state of the iterator.
type IteratorPublicKeySet ¶
Iterator returns a stateful iterator whose values can be fetched by an index.
func (IteratorPublicKeySet) Value ¶
func (iterator IteratorPublicKeySet) Value() ecc.PublicKey
Value returns the current element's value. Does not modify the state of the iterator.
type NamePairSet ¶
Set holds elements in a red-black Tree
func CopyFromNamePairSet ¶
func CopyFromNamePairSet(ts *NamePairSet) *NamePairSet
func NewNamePairSet ¶
func NewNamePairSet(Value ...common.NamePair) *NamePairSet
func (*NamePairSet) Add ¶
func (set *NamePairSet) Add(items ...common.NamePair)
Add adds the items (one or more) to the set.
func (*NamePairSet) AddItem ¶
Add adds the item one to the set.Returns false and the interface if it already exists
func (*NamePairSet) Begin ¶
func (set *NamePairSet) Begin() IteratorNamePairSet
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*NamePairSet) Contains ¶
func (set *NamePairSet) Contains(items ...common.NamePair) bool
Contains checks weather items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*NamePairSet) Each ¶
func (set *NamePairSet) Each(f func(value common.NamePair))
Each calls the given function once for each element, passing that element's index and value.
func (*NamePairSet) End ¶
func (set *NamePairSet) End() IteratorNamePairSet
End returns End Iterator
func (*NamePairSet) Find ¶
Find passes each element of the container to the given function and returns the first (index,value) for which the function is true or -1,nil otherwise if no element matches the criteria.
func (*NamePairSet) Iterator ¶
func (set *NamePairSet) Iterator() IteratorNamePairSet
Iterator holding the iterator's state
func (*NamePairSet) LowerBound ¶
func (set *NamePairSet) LowerBound(item common.NamePair) IteratorNamePairSet
func (NamePairSet) MarshalJSON ¶
func (set NamePairSet) MarshalJSON() ([]byte, error)
ToJSON outputs the JSON representation of the set.
func (NamePairSet) Pack ¶
func (set NamePairSet) Pack() (re []byte, err error)
func (*NamePairSet) Remove ¶
func (set *NamePairSet) Remove(items ...common.NamePair)
Remove removes the items (one or more) from the set.
func (*NamePairSet) String ¶
func (set *NamePairSet) String() string
String returns a string representation of container
func (*NamePairSet) UnmarshalJSON ¶
func (set *NamePairSet) UnmarshalJSON(data []byte) error
FromJSON populates the set from the input JSON representation.
func (*NamePairSet) UpperBound ¶
func (set *NamePairSet) UpperBound(item common.NamePair) IteratorNamePairSet
func (*NamePairSet) Values ¶
func (set *NamePairSet) Values() []common.NamePair
Values returns all items in the set.
type PermissionLevelSet ¶
Set holds elements in a red-black Tree
func CopyFromPermissionLevelSet ¶
func CopyFromPermissionLevelSet(ts *PermissionLevelSet) *PermissionLevelSet
func NewPermissionLevelSet ¶
func NewPermissionLevelSet(Value ...common.PermissionLevel) *PermissionLevelSet
func (*PermissionLevelSet) Add ¶
func (set *PermissionLevelSet) Add(items ...common.PermissionLevel)
Add adds the items (one or more) to the set.
func (*PermissionLevelSet) AddItem ¶
func (set *PermissionLevelSet) AddItem(item common.PermissionLevel) (bool, common.PermissionLevel)
Add adds the item one to the set.Returns false and the interface if it already exists
func (*PermissionLevelSet) Begin ¶
func (set *PermissionLevelSet) Begin() IteratorPermissionLevelSet
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*PermissionLevelSet) Contains ¶
func (set *PermissionLevelSet) Contains(items ...common.PermissionLevel) bool
Contains checks weather items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*PermissionLevelSet) Each ¶
func (set *PermissionLevelSet) Each(f func(value common.PermissionLevel))
Each calls the given function once for each element, passing that element's index and value.
func (*PermissionLevelSet) End ¶
func (set *PermissionLevelSet) End() IteratorPermissionLevelSet
End returns End Iterator
func (*PermissionLevelSet) Find ¶
func (set *PermissionLevelSet) Find(f func(value common.PermissionLevel) bool) (v common.PermissionLevel)
Find passes each element of the container to the given function and returns the first (index,value) for which the function is true or -1,nil otherwise if no element matches the criteria.
func (*PermissionLevelSet) Iterator ¶
func (set *PermissionLevelSet) Iterator() IteratorPermissionLevelSet
Iterator holding the iterator's state
func (*PermissionLevelSet) LowerBound ¶
func (set *PermissionLevelSet) LowerBound(item common.PermissionLevel) IteratorPermissionLevelSet
func (PermissionLevelSet) MarshalJSON ¶
func (set PermissionLevelSet) MarshalJSON() ([]byte, error)
ToJSON outputs the JSON representation of the set.
func (PermissionLevelSet) Pack ¶
func (set PermissionLevelSet) Pack() (re []byte, err error)
func (*PermissionLevelSet) Remove ¶
func (set *PermissionLevelSet) Remove(items ...common.PermissionLevel)
Remove removes the items (one or more) from the set.
func (*PermissionLevelSet) String ¶
func (set *PermissionLevelSet) String() string
String returns a string representation of container
func (*PermissionLevelSet) UnmarshalJSON ¶
func (set *PermissionLevelSet) UnmarshalJSON(data []byte) error
FromJSON populates the set from the input JSON representation.
func (*PermissionLevelSet) UpperBound ¶
func (set *PermissionLevelSet) UpperBound(item common.PermissionLevel) IteratorPermissionLevelSet
func (*PermissionLevelSet) Values ¶
func (set *PermissionLevelSet) Values() []common.PermissionLevel
Values returns all items in the set.
type PublicKeySet ¶
Set holds elements in a red-black Tree
func CopyFromPublicKeySet ¶
func CopyFromPublicKeySet(ts *PublicKeySet) *PublicKeySet
func NewPublicKeySet ¶
func NewPublicKeySet(Value ...ecc.PublicKey) *PublicKeySet
func (*PublicKeySet) Add ¶
func (set *PublicKeySet) Add(items ...ecc.PublicKey)
Add adds the items (one or more) to the set.
func (*PublicKeySet) AddItem ¶
Add adds the item one to the set.Returns false and the interface if it already exists
func (*PublicKeySet) Begin ¶
func (set *PublicKeySet) Begin() IteratorPublicKeySet
Begin returns First Iterator whose position points to the first element Return End Iterator when the map is empty
func (*PublicKeySet) Contains ¶
func (set *PublicKeySet) Contains(items ...ecc.PublicKey) bool
Contains checks weather items (one or more) are present in the set. All items have to be present in the set for the method to return true. Returns true if no arguments are passed at all, i.e. set is always superset of empty set.
func (*PublicKeySet) Each ¶
func (set *PublicKeySet) Each(f func(value ecc.PublicKey))
Each calls the given function once for each element, passing that element's index and value.
func (*PublicKeySet) End ¶
func (set *PublicKeySet) End() IteratorPublicKeySet
End returns End Iterator
func (*PublicKeySet) Find ¶
Find passes each element of the container to the given function and returns the first (index,value) for which the function is true or -1,nil otherwise if no element matches the criteria.
func (*PublicKeySet) Iterator ¶
func (set *PublicKeySet) Iterator() IteratorPublicKeySet
Iterator holding the iterator's state
func (*PublicKeySet) LowerBound ¶
func (set *PublicKeySet) LowerBound(item ecc.PublicKey) IteratorPublicKeySet
func (PublicKeySet) MarshalJSON ¶
func (set PublicKeySet) MarshalJSON() ([]byte, error)
ToJSON outputs the JSON representation of the set.
func (PublicKeySet) Pack ¶
func (set PublicKeySet) Pack() (re []byte, err error)
func (*PublicKeySet) Remove ¶
func (set *PublicKeySet) Remove(items ...ecc.PublicKey)
Remove removes the items (one or more) from the set.
func (*PublicKeySet) String ¶
func (set *PublicKeySet) String() string
String returns a string representation of container
func (*PublicKeySet) UnmarshalJSON ¶
func (set *PublicKeySet) UnmarshalJSON(data []byte) error
FromJSON populates the set from the input JSON representation.
func (*PublicKeySet) UpperBound ¶
func (set *PublicKeySet) UpperBound(item ecc.PublicKey) IteratorPublicKeySet
func (*PublicKeySet) Values ¶
func (set *PublicKeySet) Values() []ecc.PublicKey
Values returns all items in the set.