# Module: queue

Implements the various functions of a queue data structure, using the specified name-space on the D-data structure.

Author:
  - Seth Hollingsead
Copyright:
  - Copyright © 2022-… by Seth Hollingsead. All rights reserved
Source:
  - structures/queue.js, line 1

### Requires

- module:loggers
- module:data
- @haystacks/constants
- path

### Methods

#### (inner) dequeue(queueNameSpace) → {string}

Gets the entity at the front of the queue, removes it from the queue and returns that entity.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace the queue array should be dequeued from.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 44

##### Returns:

The item at the front of the queue and removes it from the queue.

Type
  string

#### (inner) enqueue(queueNameSpace, value) → {void}

Adds the value to the specified namespace queue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace the queue array should have a value added to.
`value` | string | The value that should be added to the specified queue array.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 64

##### Returns:

Type
  void

#### (inner) initQueue(queueNameSpace) → {void}

Initializes the queue with the provided namespace.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace the queue array should be created under.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 27

##### Returns:

Type
  void

#### (inner) isEmpty(queueNameSpace) → {boolean}

Determines if the queue is empty or not empty.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace the queue array should have a value added to.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 83

##### Returns:

True or False to indicate if the queue is empty or not empty.

Type
  boolean

#### (inner) queueFront(queueNameSpace) → {string}

Gets the entity at the front of the queue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace the queue array from which the front of the queue should be found.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 107

##### Returns:

The entity at the front of the queue.

Type
  string

#### (inner) queuePrint(queueNameSpace) → {void}

Prints out the queue as specified by the namespace input parameter.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace that should be used to print out the contents of the queue on the D-data structure.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 157

##### Returns:

Type
  void

#### (inner) queueSize(queueNameSpace) → {integer}

Gets the current size of the queue.

##### Parameters:

Name | Type | Description
--- | --- | ---
`queueNameSpace` | string | The namespace of the queue array from which we should get the current queue size.

Author:
  - Seth Hollingsead
Source:
  - structures/queue.js, line 132

##### Returns:

A count for the number of entities in the specified queue.

Type
  integer