Documentation ¶
Index ¶
- type Element
- type Iterator
- type LinkedQueue
- func (queue *LinkedQueue) Clear() bool
- func (queue *LinkedQueue) Exist(e Element) bool
- func (queue *LinkedQueue) IsEmpty() bool
- func (queue *LinkedQueue) NewIterator() *Iterator
- func (queue *LinkedQueue) PeekBack() Element
- func (queue *LinkedQueue) PeekFront() Element
- func (queue *LinkedQueue) PollBack() Element
- func (queue *LinkedQueue) PollFront() Element
- func (queue *LinkedQueue) PushBack(e Element)
- func (queue *LinkedQueue) PushFront(e Element)
- func (queue *LinkedQueue) Remove(e Element) bool
- func (queue *LinkedQueue) Size() int
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element interface{}
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
type LinkedQueue ¶
type LinkedQueue struct {
// contains filtered or unexported fields
}
func NewLinkedQueue ¶
func NewLinkedQueue() *LinkedQueue
func (*LinkedQueue) Clear ¶
func (queue *LinkedQueue) Clear() bool
func (*LinkedQueue) Exist ¶
func (queue *LinkedQueue) Exist(e Element) bool
func (*LinkedQueue) IsEmpty ¶
func (queue *LinkedQueue) IsEmpty() bool
func (*LinkedQueue) NewIterator ¶
func (queue *LinkedQueue) NewIterator() *Iterator
NewIterator creates a new iterator for the cache.
func (*LinkedQueue) PeekBack ¶
func (queue *LinkedQueue) PeekBack() Element
func (*LinkedQueue) PeekFront ¶
func (queue *LinkedQueue) PeekFront() Element
func (*LinkedQueue) PollBack ¶
func (queue *LinkedQueue) PollBack() Element
func (*LinkedQueue) PushBack ¶
func (queue *LinkedQueue) PushBack(e Element)
func (*LinkedQueue) PushFront ¶
func (queue *LinkedQueue) PushFront(e Element)
func (*LinkedQueue) Remove ¶
func (queue *LinkedQueue) Remove(e Element) bool
func (*LinkedQueue) Size ¶
func (queue *LinkedQueue) Size() int
type Queue ¶
type Queue interface { PushFront(e Element) // 向队头添加元素 PushBack(e Element) // 向队尾添加元素 PeekFront() Element // 查看头部的元素 PeekBack() Element // 查看尾部的元素 PollFront() Element // 移除头部的元素 PollBack() Element // 移除尾部的元素 Remove(e Element) bool // 删除一个值 Exist(e Element) bool // 是否存在 Size() int // 获取队列的元素个数 IsEmpty() bool // 判断队列是否是空 Clear() bool // 清空队列 NewIterator() *Iterator }
Click to show internal directories.
Click to hide internal directories.