Documentation ¶
Index ¶
- Variables
- type CircularQueue
- func (c *CircularQueue) At(i int) (interface{}, error)
- func (c *CircularQueue) Back() (interface{}, error)
- func (c *CircularQueue) Empty() bool
- func (c *CircularQueue) Front() (interface{}, error)
- func (c *CircularQueue) Full() bool
- func (c *CircularQueue) PopFront() (interface{}, error)
- func (c *CircularQueue) PushBack(v interface{}) error
- func (c *CircularQueue) Size() int
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCircularQueue = errors.New("circular queue: fxxk")
Functions ¶
This section is empty.
Types ¶
type CircularQueue ¶
type CircularQueue struct {
// contains filtered or unexported fields
}
func New ¶
func New(capacity int) *CircularQueue
func (*CircularQueue) Back ¶
func (c *CircularQueue) Back() (interface{}, error)
@return 如果队列为空,则返回错误
func (*CircularQueue) Empty ¶
func (c *CircularQueue) Empty() bool
func (*CircularQueue) Front ¶
func (c *CircularQueue) Front() (interface{}, error)
@return 如果队列为空,则返回错误
func (*CircularQueue) Full ¶
func (c *CircularQueue) Full() bool
func (*CircularQueue) PopFront ¶
func (c *CircularQueue) PopFront() (interface{}, error)
@return 如果队列为空,则返回错误
func (*CircularQueue) PushBack ¶
func (c *CircularQueue) PushBack(v interface{}) error
@return 如果队列满了,则返回错误
func (*CircularQueue) Size ¶
func (c *CircularQueue) Size() int
Click to show internal directories.
Click to hide internal directories.