-
Notifications
You must be signed in to change notification settings - Fork 0
pos.Queue
Peter edited this page Mar 19, 2024
·
2 revisions
v1.8
Instantiate a new queue
Instantiate a new network socket
Variable | Description |
---|---|
__arr: any[] |
PRIVATE |
__first: number |
PRIVATE |
__last: number |
PRIVATE |
Signature | Return | Description |
---|---|---|
__init__() |
nil |
PRIVATE Initialize the queue |
enqueue(item) |
nil |
Adds an item to the end of the queue |
dequeue() |
any? |
Removes the first item from the queue and return it |
peek() |
any? |
Return the fist item in the queue without removing it |
size() |
number |
Get the number of items in the queue |
clear() |
nil |
Clear all items from the queue |
Queue:__init__(): nil
PRIVATE
Initialize the queue
Queue:enqueue(item: any): nil
Adds an item to the end of the queue
item: any
Queue:dequeue(): any?
Removes the first item from the queue and return it
item: any?
Queue:peek(): any?
Return the fist item in the queue without removing it
item: any?
Queue:size(): number
Get the number of items in the queue
size: number
Queue:clear(): number
Clear all items from the queue