Documentation ¶
Overview ¶
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Copyright 2015 Mathieu MAST. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.
Index ¶
- type BinaryTree
- func (tree *BinaryTree) Add(element interface{}) error
- func (tree *BinaryTree) Contains(element interface{}) bool
- func (tree *BinaryTree) Get(element interface{}) (interface{}, error)
- func (tree *BinaryTree) Left() (interface{}, error)
- func (tree *BinaryTree) Remove(element interface{}) error
- func (tree *BinaryTree) Right() (interface{}, error)
- func (tree *BinaryTree) SetCompareFunc(compare Compare)
- func (tree *BinaryTree) Size() int
- func (tree *BinaryTree) ToArray() []interface{}
- func (tree *BinaryTree) ToArrayOfType(elementType reflect.Type) interface{}
- func (tree *BinaryTree) Visit(trait func(element interface{}, i int))
- type BinaryTreeNode
- type Compare
- type Container
- type KeyValue
- type LimitedBinaryTree
- type LinkedList
- func (list *LinkedList) Add(element interface{}) error
- func (list *LinkedList) Contains(element interface{}) bool
- func (list *LinkedList) Get(elementId interface{}) (interface{}, error)
- func (list *LinkedList) Remove(elementId interface{}) error
- func (list *LinkedList) Size() int
- func (list *LinkedList) ToArray() []interface{}
- func (list *LinkedList) ToArrayOfType(elementType reflect.Type) interface{}
- func (list *LinkedList) Visit(trait func(element interface{}, i int))
- type LinkedListItem
- type Map
- func (m *Map) Add(keyValue interface{}) error
- func (m *Map) Contains(key interface{}) bool
- func (m *Map) Get(key interface{}) (interface{}, error)
- func (m *Map) Remove(key interface{}) error
- func (m *Map) Size() int
- func (m *Map) ToArray() []interface{}
- func (m *Map) ToArrayOfType(elementType reflect.Type) interface{}
- func (m *Map) Visit(trait func(element interface{}, i int))
- type Set
- func (s *Set) Add(element interface{}) error
- func (s *Set) Contains(element interface{}) bool
- func (s *Set) Get(element interface{}) (interface{}, error)
- func (s *Set) Remove(element interface{}) error
- func (s *Set) Size() int
- func (s *Set) ToArray() []interface{}
- func (s *Set) ToArrayOfType(elementType reflect.Type) interface{}
- func (s *Set) Visit(trait func(element interface{}, i int))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryTree ¶
type BinaryTree struct { Head *BinaryTreeNode // contains filtered or unexported fields }
func NewBinaryTree ¶
func NewBinaryTree(compare Compare) *BinaryTree
func (*BinaryTree) Add ¶
func (tree *BinaryTree) Add(element interface{}) error
func (*BinaryTree) Contains ¶
func (tree *BinaryTree) Contains(element interface{}) bool
func (*BinaryTree) Get ¶
func (tree *BinaryTree) Get(element interface{}) (interface{}, error)
func (*BinaryTree) Left ¶
func (tree *BinaryTree) Left() (interface{}, error)
func (*BinaryTree) Remove ¶
func (tree *BinaryTree) Remove(element interface{}) error
func (*BinaryTree) Right ¶
func (tree *BinaryTree) Right() (interface{}, error)
func (*BinaryTree) SetCompareFunc ¶
func (tree *BinaryTree) SetCompareFunc(compare Compare)
func (*BinaryTree) Size ¶
func (tree *BinaryTree) Size() int
func (*BinaryTree) ToArray ¶
func (tree *BinaryTree) ToArray() []interface{}
func (*BinaryTree) ToArrayOfType ¶
func (tree *BinaryTree) ToArrayOfType(elementType reflect.Type) interface{}
func (*BinaryTree) Visit ¶
func (tree *BinaryTree) Visit(trait func(element interface{}, i int))
type BinaryTreeNode ¶
type BinaryTreeNode struct { Element interface{} Left, Right *BinaryTreeNode }
func NewBinaryTreeNode ¶
func NewBinaryTreeNode(element interface{}) *BinaryTreeNode
type LimitedBinaryTree ¶
type LimitedBinaryTree struct { BinaryTree Limit int PreserveMin bool }
func NewLimitedBinaryTree ¶
func NewLimitedBinaryTree(compare Compare, limit int, preserveMin bool) *LimitedBinaryTree
func (*LimitedBinaryTree) Add ¶
func (tree *LimitedBinaryTree) Add(element interface{}) error
type LinkedList ¶
type LinkedList struct { Head *LinkedListItem // contains filtered or unexported fields }
func NewLinkedList ¶
func NewLinkedList() *LinkedList
func (*LinkedList) Add ¶
func (list *LinkedList) Add(element interface{}) error
func (*LinkedList) Contains ¶
func (list *LinkedList) Contains(element interface{}) bool
func (*LinkedList) Get ¶
func (list *LinkedList) Get(elementId interface{}) (interface{}, error)
func (*LinkedList) Remove ¶
func (list *LinkedList) Remove(elementId interface{}) error
func (*LinkedList) Size ¶
func (list *LinkedList) Size() int
func (*LinkedList) ToArray ¶
func (list *LinkedList) ToArray() []interface{}
func (*LinkedList) ToArrayOfType ¶
func (list *LinkedList) ToArrayOfType(elementType reflect.Type) interface{}
func (*LinkedList) Visit ¶
func (list *LinkedList) Visit(trait func(element interface{}, i int))
type LinkedListItem ¶
type LinkedListItem struct { Element interface{} Next *LinkedListItem }
type Map ¶
type Map struct { Map map[interface{}]interface{} // contains filtered or unexported fields }
func (*Map) ToArrayOfType ¶
type Set ¶
type Set struct { Map map[interface{}]bool // contains filtered or unexported fields }