diff --git a/docs/classes/CircularDoublyLinkedList.md b/docs/classes/CircularDoublyLinkedList.md index 6e27279..09bbf44 100644 --- a/docs/classes/CircularDoublyLinkedList.md +++ b/docs/classes/CircularDoublyLinkedList.md @@ -29,6 +29,7 @@ ### Methods - [clear](CircularDoublyLinkedList.md#clear) +- [contains](CircularDoublyLinkedList.md#contains) - [copyLinkedListValuesToHead](CircularDoublyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](CircularDoublyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](CircularDoublyLinkedList.md#copylinkedlistvaluestotail) @@ -89,7 +90,7 @@ #### Defined in -[classes/lists/DoublyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L7) +[classes/lists/DoublyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L7) ___ @@ -103,7 +104,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L9) +[classes/lists/DoublyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L9) ___ @@ -117,7 +118,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L8) +[classes/lists/DoublyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L8) ## Methods @@ -137,7 +138,33 @@ Clears the list such that it contains no nodes #### Defined in -[classes/lists/DoublyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L11) +[classes/lists/DoublyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L11) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Returns + +`boolean` + +#### Inherited from + +[DoublyLinkedList](DoublyLinkedList.md).[contains](DoublyLinkedList.md#contains) + +#### Defined in + +[classes/lists/DoublyLinkedList.ts:325](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L325) ___ @@ -165,7 +192,7 @@ head of this list #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L6) +[classes/lists/CircularDoublyLinkedList.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L6) ___ @@ -193,7 +220,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L53) +[classes/lists/DoublyLinkedList.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L53) ___ @@ -221,7 +248,7 @@ tail of this list #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:15](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L15) +[classes/lists/CircularDoublyLinkedList.ts:15](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L15) ___ @@ -248,7 +275,7 @@ ___ #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:24](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L24) +[classes/lists/CircularDoublyLinkedList.ts:24](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L24) ___ @@ -274,7 +301,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:612](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L612) +[classes/lists/DoublyLinkedList.ts:622](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L622) ___ @@ -300,7 +327,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:638](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L638) +[classes/lists/DoublyLinkedList.ts:648](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L648) ___ @@ -318,7 +345,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:715](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L715) +[classes/lists/DoublyLinkedList.ts:725](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L725) ___ @@ -341,7 +368,7 @@ a circular list #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L47) +[classes/lists/CircularDoublyLinkedList.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L47) ___ @@ -363,7 +390,7 @@ Iterator will loop from tail value to head value. #### Defined in -[classes/lists/DoublyLinkedList.ts:148](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L148) +[classes/lists/DoublyLinkedList.ts:148](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L148) ___ @@ -381,7 +408,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:697](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L697) +[classes/lists/DoublyLinkedList.ts:707](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L707) ___ @@ -404,7 +431,7 @@ a circular list #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:75](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L75) +[classes/lists/CircularDoublyLinkedList.ts:75](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L75) ___ @@ -426,7 +453,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/DoublyLinkedList.ts:170](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L170) +[classes/lists/DoublyLinkedList.ts:170](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L170) ___ @@ -446,7 +473,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[classes/lists/DoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L179) +[classes/lists/DoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L179) ___ @@ -476,7 +503,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:98](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L98) +[classes/lists/CircularDoublyLinkedList.ts:98](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L98) ___ @@ -507,7 +534,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/DoublyLinkedList.ts:221](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L221) +[classes/lists/DoublyLinkedList.ts:221](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L221) ___ @@ -537,7 +564,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L109) +[classes/lists/CircularDoublyLinkedList.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L109) ___ @@ -557,7 +584,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[classes/lists/DoublyLinkedList.ts:298](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L298) +[classes/lists/DoublyLinkedList.ts:298](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L298) ___ @@ -583,7 +610,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[classes/lists/DoublyLinkedList.ts:302](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L302) +[classes/lists/DoublyLinkedList.ts:302](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L302) ___ @@ -603,7 +630,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[classes/lists/DoublyLinkedList.ts:321](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L321) +[classes/lists/DoublyLinkedList.ts:321](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L321) ___ @@ -623,7 +650,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:120](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L120) +[classes/lists/CircularDoublyLinkedList.ts:120](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L120) ___ @@ -643,7 +670,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:135](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L135) +[classes/lists/CircularDoublyLinkedList.ts:135](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L135) ___ @@ -669,7 +696,7 @@ Pops the value from the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:369](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L369) +[classes/lists/DoublyLinkedList.ts:379](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L379) ___ @@ -696,7 +723,7 @@ ___ #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:150](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L150) +[classes/lists/CircularDoublyLinkedList.ts:150](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L150) ___ @@ -723,7 +750,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:168](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L168) +[classes/lists/CircularDoublyLinkedList.ts:168](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L168) ___ @@ -751,7 +778,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:450](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L450) +[classes/lists/DoublyLinkedList.ts:460](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L460) ___ @@ -778,7 +805,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L179) +[classes/lists/CircularDoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L179) ___ @@ -804,7 +831,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:190](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L190) +[classes/lists/CircularDoublyLinkedList.ts:190](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L190) ___ @@ -832,7 +859,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[classes/lists/DoublyLinkedList.ts:540](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L540) +[classes/lists/DoublyLinkedList.ts:550](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L550) ___ @@ -858,7 +885,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:197](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L197) +[classes/lists/CircularDoublyLinkedList.ts:197](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L197) ___ @@ -878,7 +905,7 @@ Returns the total size of the list #### Defined in -[classes/lists/DoublyLinkedList.ts:598](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L598) +[classes/lists/DoublyLinkedList.ts:608](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L608) ___ @@ -900,4 +927,4 @@ The array with the same values in the same order #### Defined in -[classes/lists/CircularDoublyLinkedList.ts:204](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularDoublyLinkedList.ts#L204) +[classes/lists/CircularDoublyLinkedList.ts:204](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularDoublyLinkedList.ts#L204) diff --git a/docs/classes/CircularSinglyLinkedList.md b/docs/classes/CircularSinglyLinkedList.md index 5710e69..a424414 100644 --- a/docs/classes/CircularSinglyLinkedList.md +++ b/docs/classes/CircularSinglyLinkedList.md @@ -29,6 +29,7 @@ ### Methods - [clear](CircularSinglyLinkedList.md#clear) +- [contains](CircularSinglyLinkedList.md#contains) - [copyLinkedListValuesToHead](CircularSinglyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](CircularSinglyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](CircularSinglyLinkedList.md#copylinkedlistvaluestotail) @@ -86,7 +87,7 @@ #### Defined in -[classes/lists/SinglyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L7) +[classes/lists/SinglyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L7) ___ @@ -100,7 +101,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L9) +[classes/lists/SinglyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L9) ___ @@ -114,7 +115,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L8) +[classes/lists/SinglyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L8) ## Methods @@ -134,7 +135,33 @@ Clears the list such that it contains no nodes #### Defined in -[classes/lists/SinglyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L11) +[classes/lists/SinglyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L11) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Returns + +`boolean` + +#### Inherited from + +[SinglyLinkedList](SinglyLinkedList.md).[contains](SinglyLinkedList.md#contains) + +#### Defined in + +[classes/lists/SinglyLinkedList.ts:286](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L286) ___ @@ -162,7 +189,7 @@ head of this list #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L6) +[classes/lists/CircularSinglyLinkedList.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L6) ___ @@ -190,7 +217,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:48](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L48) +[classes/lists/SinglyLinkedList.ts:48](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L48) ___ @@ -218,7 +245,7 @@ tail of this list #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L14) +[classes/lists/CircularSinglyLinkedList.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L14) ___ @@ -245,7 +272,7 @@ ___ #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:22](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L22) +[classes/lists/CircularSinglyLinkedList.ts:22](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L22) ___ @@ -271,7 +298,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:561](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L561) +[classes/lists/SinglyLinkedList.ts:571](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L571) ___ @@ -297,7 +324,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:587](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L587) +[classes/lists/SinglyLinkedList.ts:597](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L597) ___ @@ -315,7 +342,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:643](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L643) +[classes/lists/SinglyLinkedList.ts:653](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L653) ___ @@ -338,7 +365,7 @@ a circular list #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:39](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L39) +[classes/lists/CircularSinglyLinkedList.ts:39](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L39) ___ @@ -360,7 +387,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/SinglyLinkedList.ts:136](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L136) +[classes/lists/SinglyLinkedList.ts:136](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L136) ___ @@ -380,7 +407,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[classes/lists/SinglyLinkedList.ts:145](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L145) +[classes/lists/SinglyLinkedList.ts:145](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L145) ___ @@ -410,7 +437,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:62](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L62) +[classes/lists/CircularSinglyLinkedList.ts:62](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L62) ___ @@ -441,7 +468,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/SinglyLinkedList.ts:185](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L185) +[classes/lists/SinglyLinkedList.ts:185](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L185) ___ @@ -471,7 +498,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L72) +[classes/lists/CircularSinglyLinkedList.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L72) ___ @@ -491,7 +518,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[classes/lists/SinglyLinkedList.ts:259](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L259) +[classes/lists/SinglyLinkedList.ts:259](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L259) ___ @@ -517,7 +544,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:82](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L82) +[classes/lists/CircularSinglyLinkedList.ts:82](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L82) ___ @@ -537,7 +564,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[classes/lists/SinglyLinkedList.ts:282](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L282) +[classes/lists/SinglyLinkedList.ts:282](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L282) ___ @@ -557,7 +584,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:105](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L105) +[classes/lists/CircularSinglyLinkedList.ts:105](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L105) ___ @@ -577,7 +604,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:127](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L127) +[classes/lists/CircularSinglyLinkedList.ts:127](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L127) ___ @@ -603,7 +630,7 @@ Pops the value from the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:337](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L337) +[classes/lists/SinglyLinkedList.ts:347](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L347) ___ @@ -630,7 +657,7 @@ ___ #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L157) +[classes/lists/CircularSinglyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L157) ___ @@ -657,7 +684,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:173](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L173) +[classes/lists/CircularSinglyLinkedList.ts:173](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L173) ___ @@ -685,7 +712,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:413](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L413) +[classes/lists/SinglyLinkedList.ts:423](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L423) ___ @@ -712,7 +739,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:183](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L183) +[classes/lists/CircularSinglyLinkedList.ts:183](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L183) ___ @@ -738,7 +765,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:193](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L193) +[classes/lists/CircularSinglyLinkedList.ts:193](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L193) ___ @@ -766,7 +793,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[classes/lists/SinglyLinkedList.ts:495](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L495) +[classes/lists/SinglyLinkedList.ts:505](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L505) ___ @@ -792,7 +819,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:199](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L199) +[classes/lists/CircularSinglyLinkedList.ts:199](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L199) ___ @@ -812,7 +839,7 @@ Returns the total size of the list #### Defined in -[classes/lists/SinglyLinkedList.ts:547](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L547) +[classes/lists/SinglyLinkedList.ts:557](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L557) ___ @@ -826,10 +853,12 @@ Iterates over the elements and puts their values into an array in the same order `T`[] +The array with the same values in the same order + #### Overrides [SinglyLinkedList](SinglyLinkedList.md).[toArray](SinglyLinkedList.md#toarray) #### Defined in -[classes/lists/CircularSinglyLinkedList.ts:205](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/CircularSinglyLinkedList.ts#L205) +[classes/lists/CircularSinglyLinkedList.ts:205](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/CircularSinglyLinkedList.ts#L205) diff --git a/docs/classes/DoublyLinkedList.md b/docs/classes/DoublyLinkedList.md index 872c5f9..1802d47 100644 --- a/docs/classes/DoublyLinkedList.md +++ b/docs/classes/DoublyLinkedList.md @@ -33,6 +33,7 @@ ### Methods - [clear](DoublyLinkedList.md#clear) +- [contains](DoublyLinkedList.md#contains) - [copyLinkedListValuesToHead](DoublyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](DoublyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](DoublyLinkedList.md#copylinkedlistvaluestotail) @@ -85,7 +86,7 @@ #### Defined in -[classes/lists/DoublyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L7) +[classes/lists/DoublyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L7) ___ @@ -95,7 +96,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L9) +[classes/lists/DoublyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L9) ___ @@ -105,7 +106,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L8) +[classes/lists/DoublyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L8) ## Methods @@ -125,7 +126,33 @@ Clears the list such that it contains no nodes #### Defined in -[classes/lists/DoublyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L11) +[classes/lists/DoublyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L11) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Returns + +`boolean` + +#### Implementation of + +[IDoublyLinkedList](../interfaces/IDoublyLinkedList.md).[contains](../interfaces/IDoublyLinkedList.md#contains) + +#### Defined in + +[classes/lists/DoublyLinkedList.ts:325](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L325) ___ @@ -153,7 +180,7 @@ head of this list #### Defined in -[classes/lists/DoublyLinkedList.ts:17](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L17) +[classes/lists/DoublyLinkedList.ts:17](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L17) ___ @@ -181,7 +208,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L53) +[classes/lists/DoublyLinkedList.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L53) ___ @@ -209,7 +236,7 @@ tail of this list #### Defined in -[classes/lists/DoublyLinkedList.ts:104](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L104) +[classes/lists/DoublyLinkedList.ts:104](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L104) ___ @@ -236,7 +263,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:131](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L131) +[classes/lists/DoublyLinkedList.ts:131](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L131) ___ @@ -258,7 +285,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:612](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L612) +[classes/lists/DoublyLinkedList.ts:622](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L622) ___ @@ -280,7 +307,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:638](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L638) +[classes/lists/DoublyLinkedList.ts:648](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L648) ___ @@ -294,7 +321,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:715](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L715) +[classes/lists/DoublyLinkedList.ts:725](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L725) ___ @@ -316,7 +343,7 @@ Iterator will loop from tail value to head value. #### Defined in -[classes/lists/DoublyLinkedList.ts:135](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L135) +[classes/lists/DoublyLinkedList.ts:135](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L135) ___ @@ -338,7 +365,7 @@ Iterator will loop from tail value to head value. #### Defined in -[classes/lists/DoublyLinkedList.ts:148](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L148) +[classes/lists/DoublyLinkedList.ts:148](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L148) ___ @@ -352,7 +379,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:697](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L697) +[classes/lists/DoublyLinkedList.ts:707](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L707) ___ @@ -374,7 +401,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/DoublyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L157) +[classes/lists/DoublyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L157) ___ @@ -396,7 +423,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/DoublyLinkedList.ts:170](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L170) +[classes/lists/DoublyLinkedList.ts:170](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L170) ___ @@ -416,7 +443,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[classes/lists/DoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L179) +[classes/lists/DoublyLinkedList.ts:179](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L179) ___ @@ -442,7 +469,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/DoublyLinkedList.ts:191](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L191) +[classes/lists/DoublyLinkedList.ts:191](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L191) ___ @@ -469,7 +496,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/DoublyLinkedList.ts:221](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L221) +[classes/lists/DoublyLinkedList.ts:221](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L221) ___ @@ -495,7 +522,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/DoublyLinkedList.ts:276](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L276) +[classes/lists/DoublyLinkedList.ts:276](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L276) ___ @@ -515,7 +542,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[classes/lists/DoublyLinkedList.ts:298](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L298) +[classes/lists/DoublyLinkedList.ts:298](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L298) ___ @@ -541,7 +568,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[classes/lists/DoublyLinkedList.ts:302](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L302) +[classes/lists/DoublyLinkedList.ts:302](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L302) ___ @@ -561,7 +588,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[classes/lists/DoublyLinkedList.ts:321](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L321) +[classes/lists/DoublyLinkedList.ts:321](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L321) ___ @@ -581,7 +608,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[classes/lists/DoublyLinkedList.ts:325](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L325) +[classes/lists/DoublyLinkedList.ts:335](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L335) ___ @@ -601,7 +628,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[classes/lists/DoublyLinkedList.ts:347](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L347) +[classes/lists/DoublyLinkedList.ts:357](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L357) ___ @@ -627,7 +654,7 @@ Pops the value from the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:369](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L369) +[classes/lists/DoublyLinkedList.ts:379](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L379) ___ @@ -654,7 +681,7 @@ ___ #### Defined in -[classes/lists/DoublyLinkedList.ts:412](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L412) +[classes/lists/DoublyLinkedList.ts:422](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L422) ___ @@ -681,7 +708,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[classes/lists/DoublyLinkedList.ts:416](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L416) +[classes/lists/DoublyLinkedList.ts:426](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L426) ___ @@ -709,7 +736,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[classes/lists/DoublyLinkedList.ts:450](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L450) +[classes/lists/DoublyLinkedList.ts:460](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L460) ___ @@ -736,7 +763,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[classes/lists/DoublyLinkedList.ts:501](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L501) +[classes/lists/DoublyLinkedList.ts:511](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L511) ___ @@ -762,7 +789,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[classes/lists/DoublyLinkedList.ts:523](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L523) +[classes/lists/DoublyLinkedList.ts:533](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L533) ___ @@ -790,7 +817,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[classes/lists/DoublyLinkedList.ts:540](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L540) +[classes/lists/DoublyLinkedList.ts:550](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L550) ___ @@ -816,7 +843,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[classes/lists/DoublyLinkedList.ts:581](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L581) +[classes/lists/DoublyLinkedList.ts:591](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L591) ___ @@ -836,7 +863,7 @@ Returns the total size of the list #### Defined in -[classes/lists/DoublyLinkedList.ts:598](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L598) +[classes/lists/DoublyLinkedList.ts:608](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L608) ___ @@ -858,4 +885,4 @@ The array with the same values in the same order #### Defined in -[classes/lists/DoublyLinkedList.ts:602](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/DoublyLinkedList.ts#L602) +[classes/lists/DoublyLinkedList.ts:612](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/DoublyLinkedList.ts#L612) diff --git a/docs/classes/DoublyLinkedListNode.md b/docs/classes/DoublyLinkedListNode.md index 911caa9..6e5a39c 100644 --- a/docs/classes/DoublyLinkedListNode.md +++ b/docs/classes/DoublyLinkedListNode.md @@ -46,7 +46,7 @@ #### Defined in -[classes/nodes/DoublyLinkedListNode.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/nodes/DoublyLinkedListNode.ts#L7) +[classes/nodes/DoublyLinkedListNode.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/nodes/DoublyLinkedListNode.ts#L7) ## Properties @@ -62,7 +62,7 @@ A reference to the next node, or "right" neighbor, from this node #### Defined in -[classes/nodes/DoublyLinkedListNode.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/nodes/DoublyLinkedListNode.ts#L4) +[classes/nodes/DoublyLinkedListNode.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/nodes/DoublyLinkedListNode.ts#L4) ___ @@ -78,7 +78,7 @@ A reference to the previous node, or "left" neighbor, from this node #### Defined in -[classes/nodes/DoublyLinkedListNode.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/nodes/DoublyLinkedListNode.ts#L5) +[classes/nodes/DoublyLinkedListNode.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/nodes/DoublyLinkedListNode.ts#L5) ___ diff --git a/docs/classes/SinglyLinkedList.md b/docs/classes/SinglyLinkedList.md index 6aa2cdb..6758659 100644 --- a/docs/classes/SinglyLinkedList.md +++ b/docs/classes/SinglyLinkedList.md @@ -33,6 +33,7 @@ ### Methods - [clear](SinglyLinkedList.md#clear) +- [contains](SinglyLinkedList.md#contains) - [copyLinkedListValuesToHead](SinglyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](SinglyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](SinglyLinkedList.md#copylinkedlistvaluestotail) @@ -82,7 +83,7 @@ #### Defined in -[classes/lists/SinglyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L7) +[classes/lists/SinglyLinkedList.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L7) ___ @@ -92,7 +93,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L9) +[classes/lists/SinglyLinkedList.ts:9](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L9) ___ @@ -102,7 +103,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L8) +[classes/lists/SinglyLinkedList.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L8) ## Methods @@ -122,7 +123,33 @@ Clears the list such that it contains no nodes #### Defined in -[classes/lists/SinglyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L11) +[classes/lists/SinglyLinkedList.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L11) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `value` | `T` | + +#### Returns + +`boolean` + +#### Implementation of + +[ISinglyLinkedList](../interfaces/ISinglyLinkedList.md).[contains](../interfaces/ISinglyLinkedList.md#contains) + +#### Defined in + +[classes/lists/SinglyLinkedList.ts:286](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L286) ___ @@ -150,7 +177,7 @@ head of this list #### Defined in -[classes/lists/SinglyLinkedList.ts:17](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L17) +[classes/lists/SinglyLinkedList.ts:17](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L17) ___ @@ -178,7 +205,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:48](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L48) +[classes/lists/SinglyLinkedList.ts:48](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L48) ___ @@ -206,7 +233,7 @@ tail of this list #### Defined in -[classes/lists/SinglyLinkedList.ts:98](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L98) +[classes/lists/SinglyLinkedList.ts:98](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L98) ___ @@ -233,7 +260,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:119](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L119) +[classes/lists/SinglyLinkedList.ts:119](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L119) ___ @@ -255,7 +282,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:561](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L561) +[classes/lists/SinglyLinkedList.ts:571](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L571) ___ @@ -277,7 +304,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:587](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L587) +[classes/lists/SinglyLinkedList.ts:597](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L597) ___ @@ -291,7 +318,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:643](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L643) +[classes/lists/SinglyLinkedList.ts:653](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L653) ___ @@ -313,7 +340,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/SinglyLinkedList.ts:123](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L123) +[classes/lists/SinglyLinkedList.ts:123](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L123) ___ @@ -335,7 +362,7 @@ Iterator will loop from head value to tail value. #### Defined in -[classes/lists/SinglyLinkedList.ts:136](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L136) +[classes/lists/SinglyLinkedList.ts:136](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L136) ___ @@ -355,7 +382,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[classes/lists/SinglyLinkedList.ts:145](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L145) +[classes/lists/SinglyLinkedList.ts:145](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L145) ___ @@ -381,7 +408,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/SinglyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L157) +[classes/lists/SinglyLinkedList.ts:157](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L157) ___ @@ -408,7 +435,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/SinglyLinkedList.ts:185](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L185) +[classes/lists/SinglyLinkedList.ts:185](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L185) ___ @@ -434,7 +461,7 @@ The input list is cleared in the process. #### Defined in -[classes/lists/SinglyLinkedList.ts:238](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L238) +[classes/lists/SinglyLinkedList.ts:238](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L238) ___ @@ -454,7 +481,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[classes/lists/SinglyLinkedList.ts:259](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L259) +[classes/lists/SinglyLinkedList.ts:259](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L259) ___ @@ -480,7 +507,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[classes/lists/SinglyLinkedList.ts:263](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L263) +[classes/lists/SinglyLinkedList.ts:263](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L263) ___ @@ -500,7 +527,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[classes/lists/SinglyLinkedList.ts:282](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L282) +[classes/lists/SinglyLinkedList.ts:282](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L282) ___ @@ -520,7 +547,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[classes/lists/SinglyLinkedList.ts:286](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L286) +[classes/lists/SinglyLinkedList.ts:296](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L296) ___ @@ -540,7 +567,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[classes/lists/SinglyLinkedList.ts:306](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L306) +[classes/lists/SinglyLinkedList.ts:316](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L316) ___ @@ -566,7 +593,7 @@ Pops the value from the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:337](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L337) +[classes/lists/SinglyLinkedList.ts:347](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L347) ___ @@ -593,7 +620,7 @@ ___ #### Defined in -[classes/lists/SinglyLinkedList.ts:376](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L376) +[classes/lists/SinglyLinkedList.ts:386](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L386) ___ @@ -620,7 +647,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[classes/lists/SinglyLinkedList.ts:380](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L380) +[classes/lists/SinglyLinkedList.ts:390](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L390) ___ @@ -648,7 +675,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[classes/lists/SinglyLinkedList.ts:413](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L413) +[classes/lists/SinglyLinkedList.ts:423](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L423) ___ @@ -675,7 +702,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[classes/lists/SinglyLinkedList.ts:462](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L462) +[classes/lists/SinglyLinkedList.ts:472](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L472) ___ @@ -701,7 +728,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[classes/lists/SinglyLinkedList.ts:483](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L483) +[classes/lists/SinglyLinkedList.ts:493](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L493) ___ @@ -729,7 +756,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[classes/lists/SinglyLinkedList.ts:495](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L495) +[classes/lists/SinglyLinkedList.ts:505](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L505) ___ @@ -755,7 +782,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[classes/lists/SinglyLinkedList.ts:534](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L534) +[classes/lists/SinglyLinkedList.ts:544](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L544) ___ @@ -775,7 +802,7 @@ Returns the total size of the list #### Defined in -[classes/lists/SinglyLinkedList.ts:547](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L547) +[classes/lists/SinglyLinkedList.ts:557](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L557) ___ @@ -789,10 +816,12 @@ Iterates over the elements and puts their values into an array in the same order `T`[] +The array with the same values in the same order + #### Implementation of [ISinglyLinkedList](../interfaces/ISinglyLinkedList.md).[toArray](../interfaces/ISinglyLinkedList.md#toarray) #### Defined in -[classes/lists/SinglyLinkedList.ts:551](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/lists/SinglyLinkedList.ts#L551) +[classes/lists/SinglyLinkedList.ts:561](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/lists/SinglyLinkedList.ts#L561) diff --git a/docs/classes/SinglyLinkedListNode.md b/docs/classes/SinglyLinkedListNode.md index 8750b85..a7c820f 100644 --- a/docs/classes/SinglyLinkedListNode.md +++ b/docs/classes/SinglyLinkedListNode.md @@ -44,7 +44,7 @@ #### Defined in -[classes/nodes/SinglyLinkedListNode.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/nodes/SinglyLinkedListNode.ts#L6) +[classes/nodes/SinglyLinkedListNode.ts:6](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/nodes/SinglyLinkedListNode.ts#L6) ## Properties @@ -60,7 +60,7 @@ A reference to the next node, or "right" neighbor, from this node #### Defined in -[classes/nodes/SinglyLinkedListNode.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/classes/nodes/SinglyLinkedListNode.ts#L4) +[classes/nodes/SinglyLinkedListNode.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/classes/nodes/SinglyLinkedListNode.ts#L4) ___ diff --git a/docs/interfaces/IDoublyLinkedList.md b/docs/interfaces/IDoublyLinkedList.md index 9c4a64b..f1687ea 100644 --- a/docs/interfaces/IDoublyLinkedList.md +++ b/docs/interfaces/IDoublyLinkedList.md @@ -25,6 +25,7 @@ ### Methods - [clear](IDoublyLinkedList.md#clear) +- [contains](IDoublyLinkedList.md#contains) - [copyLinkedListValuesToHead](IDoublyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](IDoublyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](IDoublyLinkedList.md#copylinkedlistvaluestotail) @@ -68,7 +69,33 @@ Clears the list such that it contains no nodes #### Defined in -[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L10) +[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L10) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `T` | The value to compare against | + +#### Returns + +`boolean` + +#### Inherited from + +[ILinkedList](ILinkedList.md).[contains](ILinkedList.md#contains) + +#### Defined in + +[interfaces/IReadonlyLinkedList.d.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L53) ___ @@ -96,7 +123,7 @@ head of this list #### Defined in -[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L18) +[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L18) ___ @@ -126,7 +153,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L27) +[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L27) ___ @@ -154,7 +181,7 @@ tail of this list #### Defined in -[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L35) +[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L35) ___ @@ -181,7 +208,7 @@ ___ #### Defined in -[interfaces/IDoublyLinkedList.d.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IDoublyLinkedList.d.ts#L8) +[interfaces/IDoublyLinkedList.d.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IDoublyLinkedList.d.ts#L8) ___ @@ -203,7 +230,7 @@ Iterator will loop from tail value to head value. #### Defined in -[interfaces/IReadonlyDoublyLinkedList.d.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L14) +[interfaces/IReadonlyDoublyLinkedList.d.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L14) ___ @@ -225,7 +252,7 @@ Iterator will loop from tail value to head value. #### Defined in -[interfaces/IReadonlyDoublyLinkedList.d.ts:21](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L21) +[interfaces/IReadonlyDoublyLinkedList.d.ts:21](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L21) ___ @@ -247,7 +274,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L18) +[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L18) ___ @@ -269,7 +296,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L25) +[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L25) ___ @@ -289,7 +316,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L30) +[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L30) ___ @@ -309,7 +336,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L35) +[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L35) ___ @@ -337,7 +364,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L42) +[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L42) ___ @@ -357,7 +384,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L47) +[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L47) ___ @@ -377,7 +404,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L45) +[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L45) ___ @@ -397,7 +424,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L50) +[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L50) ___ @@ -425,7 +452,7 @@ Pops the value from the given index #### Defined in -[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L57) +[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L57) ___ @@ -452,7 +479,7 @@ ___ #### Defined in -[interfaces/IDoublyLinkedList.d.ts:13](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IDoublyLinkedList.d.ts#L13) +[interfaces/IDoublyLinkedList.d.ts:13](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IDoublyLinkedList.d.ts#L13) ___ @@ -479,7 +506,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L72) +[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L72) ___ @@ -509,7 +536,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L81) +[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L81) ___ @@ -536,7 +563,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L88) +[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L88) ___ @@ -562,7 +589,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L94) +[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L94) ___ @@ -592,7 +619,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L103) +[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L103) ___ @@ -618,7 +645,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L109) +[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L109) ___ @@ -638,7 +665,7 @@ Returns the total size of the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:52](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L52) +[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L58) ___ @@ -660,4 +687,4 @@ The array with the same values in the same order #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L58) +[interfaces/IReadonlyLinkedList.d.ts:64](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L64) diff --git a/docs/interfaces/IDoublyLinkedListNode.md b/docs/interfaces/IDoublyLinkedListNode.md index 1159b09..fe539b3 100644 --- a/docs/interfaces/IDoublyLinkedListNode.md +++ b/docs/interfaces/IDoublyLinkedListNode.md @@ -36,7 +36,7 @@ A reference to the next node, or "right" neighbor, from this node #### Defined in -[interfaces/IDoublyLinkedListNode.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IDoublyLinkedListNode.d.ts#L7) +[interfaces/IDoublyLinkedListNode.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IDoublyLinkedListNode.d.ts#L7) ___ @@ -48,7 +48,7 @@ A reference to the previous node, or "left" neighbor, from this node #### Defined in -[interfaces/IDoublyLinkedListNode.d.ts:12](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IDoublyLinkedListNode.d.ts#L12) +[interfaces/IDoublyLinkedListNode.d.ts:12](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IDoublyLinkedListNode.d.ts#L12) ___ @@ -64,4 +64,4 @@ The value held within this node #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/docs/interfaces/ILinkedList.md b/docs/interfaces/ILinkedList.md index f85c6a9..909141f 100644 --- a/docs/interfaces/ILinkedList.md +++ b/docs/interfaces/ILinkedList.md @@ -25,6 +25,7 @@ Defines the operations available on all linked lists ### Methods - [clear](ILinkedList.md#clear) +- [contains](ILinkedList.md#contains) - [copyLinkedListValuesToHead](ILinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](ILinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](ILinkedList.md#copylinkedlistvaluestotail) @@ -62,7 +63,33 @@ Clears the list such that it contains no nodes #### Defined in -[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L10) +[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L10) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `T` | The value to compare against | + +#### Returns + +`boolean` + +#### Inherited from + +[IReadonlyLinkedList](IReadonlyLinkedList.md).[contains](IReadonlyLinkedList.md#contains) + +#### Defined in + +[interfaces/IReadonlyLinkedList.d.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L53) ___ @@ -86,7 +113,7 @@ head of this list #### Defined in -[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L18) +[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L18) ___ @@ -112,7 +139,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L27) +[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L27) ___ @@ -136,7 +163,7 @@ tail of this list #### Defined in -[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L35) +[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L35) ___ @@ -163,7 +190,7 @@ ___ #### Defined in -[interfaces/ILinkedList.d.ts:40](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L40) +[interfaces/ILinkedList.d.ts:40](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L40) ___ @@ -185,7 +212,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L18) +[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L18) ___ @@ -207,7 +234,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L25) +[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L25) ___ @@ -227,7 +254,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L30) +[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L30) ___ @@ -247,7 +274,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L35) +[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L35) ___ @@ -275,7 +302,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L42) +[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L42) ___ @@ -295,7 +322,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L47) +[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L47) ___ @@ -311,7 +338,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L45) +[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L45) ___ @@ -327,7 +354,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L50) +[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L50) ___ @@ -351,7 +378,7 @@ Pops the value from the given index #### Defined in -[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L57) +[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L57) ___ @@ -376,7 +403,7 @@ Pops the values from the given bounds into a sublist of the same type #### Defined in -[interfaces/ILinkedList.d.ts:65](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L65) +[interfaces/ILinkedList.d.ts:65](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L65) ___ @@ -399,7 +426,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L72) +[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L72) ___ @@ -425,7 +452,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L81) +[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L81) ___ @@ -448,7 +475,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L88) +[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L88) ___ @@ -470,7 +497,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L94) +[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L94) ___ @@ -496,7 +523,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L103) +[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L103) ___ @@ -518,7 +545,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L109) +[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L109) ___ @@ -538,7 +565,7 @@ Returns the total size of the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:52](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L52) +[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L58) ___ @@ -560,4 +587,4 @@ The array with the same values in the same order #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L58) +[interfaces/IReadonlyLinkedList.d.ts:64](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L64) diff --git a/docs/interfaces/ILinkedListNode.md b/docs/interfaces/ILinkedListNode.md index 370982a..e916ae8 100644 --- a/docs/interfaces/ILinkedListNode.md +++ b/docs/interfaces/ILinkedListNode.md @@ -32,4 +32,4 @@ The value held within this node #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/docs/interfaces/IReadonlyDoublyLinkedList.md b/docs/interfaces/IReadonlyDoublyLinkedList.md index 74b67ec..d2bfc9f 100644 --- a/docs/interfaces/IReadonlyDoublyLinkedList.md +++ b/docs/interfaces/IReadonlyDoublyLinkedList.md @@ -20,6 +20,7 @@ ### Methods +- [contains](IReadonlyDoublyLinkedList.md#contains) - [copyValuesToSubList](IReadonlyDoublyLinkedList.md#copyvaluestosublist) - [getBackwardIterator](IReadonlyDoublyLinkedList.md#getbackwarditerator) - [getBackwardValuesIterator](IReadonlyDoublyLinkedList.md#getbackwardvaluesiterator) @@ -34,6 +35,32 @@ ## Methods +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `T` | The value to compare against | + +#### Returns + +`boolean` + +#### Inherited from + +[IReadonlyLinkedList](IReadonlyLinkedList.md).[contains](IReadonlyLinkedList.md#contains) + +#### Defined in + +[interfaces/IReadonlyLinkedList.d.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L53) + +___ + ### copyValuesToSubList ▸ **copyValuesToSubList**(`startIndex`, `endIndex`): [`IReadonlyDoublyLinkedList`](IReadonlyDoublyLinkedList.md)<`T`\> @@ -57,7 +84,7 @@ #### Defined in -[interfaces/IReadonlyDoublyLinkedList.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L7) +[interfaces/IReadonlyDoublyLinkedList.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L7) ___ @@ -75,7 +102,7 @@ Iterator will loop from tail value to head value. #### Defined in -[interfaces/IReadonlyDoublyLinkedList.d.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L14) +[interfaces/IReadonlyDoublyLinkedList.d.ts:14](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L14) ___ @@ -93,7 +120,7 @@ Iterator will loop from tail value to head value. #### Defined in -[interfaces/IReadonlyDoublyLinkedList.d.ts:21](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L21) +[interfaces/IReadonlyDoublyLinkedList.d.ts:21](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedList.d.ts#L21) ___ @@ -115,7 +142,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L18) +[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L18) ___ @@ -137,7 +164,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L25) +[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L25) ___ @@ -157,7 +184,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L30) +[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L30) ___ @@ -177,7 +204,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L35) +[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L35) ___ @@ -205,7 +232,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L42) +[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L42) ___ @@ -225,7 +252,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L47) +[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L47) ___ @@ -245,7 +272,7 @@ Returns the total size of the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:52](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L52) +[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L58) ___ @@ -267,4 +294,4 @@ The array with the same values in the same order #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L58) +[interfaces/IReadonlyLinkedList.d.ts:64](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L64) diff --git a/docs/interfaces/IReadonlyDoublyLinkedListNode.md b/docs/interfaces/IReadonlyDoublyLinkedListNode.md index 45f6387..867313f 100644 --- a/docs/interfaces/IReadonlyDoublyLinkedListNode.md +++ b/docs/interfaces/IReadonlyDoublyLinkedListNode.md @@ -30,7 +30,7 @@ #### Defined in -[interfaces/IReadonlyDoublyLinkedListNode.d.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedListNode.d.ts#L4) +[interfaces/IReadonlyDoublyLinkedListNode.d.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedListNode.d.ts#L4) ___ @@ -40,7 +40,7 @@ ___ #### Defined in -[interfaces/IReadonlyDoublyLinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyDoublyLinkedListNode.d.ts#L5) +[interfaces/IReadonlyDoublyLinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyDoublyLinkedListNode.d.ts#L5) ___ @@ -56,4 +56,4 @@ The value held within this node #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/docs/interfaces/IReadonlyLinkedList.md b/docs/interfaces/IReadonlyLinkedList.md index 8cb1e4d..1f4389d 100644 --- a/docs/interfaces/IReadonlyLinkedList.md +++ b/docs/interfaces/IReadonlyLinkedList.md @@ -22,6 +22,7 @@ Defines the readonly operations available on all linked lists ### Methods +- [contains](IReadonlyLinkedList.md#contains) - [copyValuesToSubList](IReadonlyLinkedList.md#copyvaluestosublist) - [getForwardIterator](IReadonlyLinkedList.md#getforwarditerator) - [getForwardValuesIterator](IReadonlyLinkedList.md#getforwardvaluesiterator) @@ -34,6 +35,28 @@ Defines the readonly operations available on all linked lists ## Methods +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `T` | The value to compare against | + +#### Returns + +`boolean` + +#### Defined in + +[interfaces/IReadonlyLinkedList.d.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L53) + +___ + ### copyValuesToSubList ▸ **copyValuesToSubList**(`startIndex`, `endIndex`): [`IReadonlyLinkedList`](IReadonlyLinkedList.md)<`T`\> @@ -55,7 +78,7 @@ Copies the values from the given bounds into a sublist of the same type #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L11) +[interfaces/IReadonlyLinkedList.d.ts:11](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L11) ___ @@ -73,7 +96,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L18) +[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L18) ___ @@ -91,7 +114,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L25) +[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L25) ___ @@ -107,7 +130,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L30) +[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L30) ___ @@ -123,7 +146,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L35) +[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L35) ___ @@ -147,7 +170,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L42) +[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L42) ___ @@ -163,7 +186,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L47) +[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L47) ___ @@ -179,7 +202,7 @@ Returns the total size of the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:52](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L52) +[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L58) ___ @@ -197,4 +220,4 @@ The array with the same values in the same order #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L58) +[interfaces/IReadonlyLinkedList.d.ts:64](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L64) diff --git a/docs/interfaces/IReadonlyLinkedListNode.md b/docs/interfaces/IReadonlyLinkedListNode.md index 1cf33f6..b378db7 100644 --- a/docs/interfaces/IReadonlyLinkedListNode.md +++ b/docs/interfaces/IReadonlyLinkedListNode.md @@ -38,4 +38,4 @@ Readonly.value #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/docs/interfaces/IReadonlySinglyLinkedListNode.md b/docs/interfaces/IReadonlySinglyLinkedListNode.md index 38918e8..0cda2b6 100644 --- a/docs/interfaces/IReadonlySinglyLinkedListNode.md +++ b/docs/interfaces/IReadonlySinglyLinkedListNode.md @@ -29,7 +29,7 @@ #### Defined in -[interfaces/IReadonlySinglyLinkedListNode.d.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlySinglyLinkedListNode.d.ts#L4) +[interfaces/IReadonlySinglyLinkedListNode.d.ts:4](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlySinglyLinkedListNode.d.ts#L4) ___ @@ -45,4 +45,4 @@ The value held within this node #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/docs/interfaces/ISinglyLinkedList.md b/docs/interfaces/ISinglyLinkedList.md index 9b572f0..0aaba37 100644 --- a/docs/interfaces/ISinglyLinkedList.md +++ b/docs/interfaces/ISinglyLinkedList.md @@ -25,6 +25,7 @@ ### Methods - [clear](ISinglyLinkedList.md#clear) +- [contains](ISinglyLinkedList.md#contains) - [copyLinkedListValuesToHead](ISinglyLinkedList.md#copylinkedlistvaluestohead) - [copyLinkedListValuesToIndex](ISinglyLinkedList.md#copylinkedlistvaluestoindex) - [copyLinkedListValuesToTail](ISinglyLinkedList.md#copylinkedlistvaluestotail) @@ -66,7 +67,33 @@ Clears the list such that it contains no nodes #### Defined in -[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L10) +[interfaces/ILinkedList.d.ts:10](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L10) + +___ + +### contains + +▸ **contains**(`value`): `boolean` + +Compares the value to each node, and returns if any were found to be equal + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `value` | `T` | The value to compare against | + +#### Returns + +`boolean` + +#### Inherited from + +[ILinkedList](ILinkedList.md).[contains](ILinkedList.md#contains) + +#### Defined in + +[interfaces/IReadonlyLinkedList.d.ts:53](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L53) ___ @@ -94,7 +121,7 @@ head of this list #### Defined in -[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L18) +[interfaces/ILinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L18) ___ @@ -124,7 +151,7 @@ with the first value in the input list going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L27) +[interfaces/ILinkedList.d.ts:27](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L27) ___ @@ -152,7 +179,7 @@ tail of this list #### Defined in -[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L35) +[interfaces/ILinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L35) ___ @@ -179,7 +206,7 @@ ___ #### Defined in -[interfaces/ISinglyLinkedList.d.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ISinglyLinkedList.d.ts#L8) +[interfaces/ISinglyLinkedList.d.ts:8](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ISinglyLinkedList.d.ts#L8) ___ @@ -201,7 +228,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L18) +[interfaces/IReadonlyLinkedList.d.ts:18](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L18) ___ @@ -223,7 +250,7 @@ Iterator will loop from head value to tail value. #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L25) +[interfaces/IReadonlyLinkedList.d.ts:25](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L25) ___ @@ -243,7 +270,7 @@ Gets whether the list is empty (i.e. no head node) #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L30) +[interfaces/IReadonlyLinkedList.d.ts:30](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L30) ___ @@ -263,7 +290,7 @@ Peeks at the value in the head node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L35) +[interfaces/IReadonlyLinkedList.d.ts:35](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L35) ___ @@ -291,7 +318,7 @@ Peeks at the value from the given index without moving nodes around #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L42) +[interfaces/IReadonlyLinkedList.d.ts:42](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L42) ___ @@ -311,7 +338,7 @@ Peeks at the value in the tail node of the list without modifying the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L47) +[interfaces/IReadonlyLinkedList.d.ts:47](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L47) ___ @@ -331,7 +358,7 @@ Pops the head node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L45) +[interfaces/ILinkedList.d.ts:45](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L45) ___ @@ -351,7 +378,7 @@ Pops the tail node off the list and returns the value, if any #### Defined in -[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L50) +[interfaces/ILinkedList.d.ts:50](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L50) ___ @@ -379,7 +406,7 @@ Pops the value from the given index #### Defined in -[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L57) +[interfaces/ILinkedList.d.ts:57](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L57) ___ @@ -406,7 +433,7 @@ ___ #### Defined in -[interfaces/ISinglyLinkedList.d.ts:13](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ISinglyLinkedList.d.ts#L13) +[interfaces/ISinglyLinkedList.d.ts:13](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ISinglyLinkedList.d.ts#L13) ___ @@ -433,7 +460,7 @@ with the first value in the array being placed as the value at the head of the l #### Defined in -[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L72) +[interfaces/ILinkedList.d.ts:72](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L72) ___ @@ -463,7 +490,7 @@ with the first value in the array going in as the node at the given index #### Defined in -[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L81) +[interfaces/ILinkedList.d.ts:81](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L81) ___ @@ -490,7 +517,7 @@ with the last value in the array being placed as the value at the tail of the li #### Defined in -[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L88) +[interfaces/ILinkedList.d.ts:88](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L88) ___ @@ -516,7 +543,7 @@ Pushes a new node to the head of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L94) +[interfaces/ILinkedList.d.ts:94](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L94) ___ @@ -546,7 +573,7 @@ index and up over - thereby incrementing each of their indexes by one. #### Defined in -[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L103) +[interfaces/ILinkedList.d.ts:103](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L103) ___ @@ -572,7 +599,7 @@ Pushes a new node to the tail of the list with the given value #### Defined in -[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedList.d.ts#L109) +[interfaces/ILinkedList.d.ts:109](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedList.d.ts#L109) ___ @@ -592,7 +619,7 @@ Returns the total size of the list #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:52](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L52) +[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L58) ___ @@ -614,4 +641,4 @@ The array with the same values in the same order #### Defined in -[interfaces/IReadonlyLinkedList.d.ts:58](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/IReadonlyLinkedList.d.ts#L58) +[interfaces/IReadonlyLinkedList.d.ts:64](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/IReadonlyLinkedList.d.ts#L64) diff --git a/docs/interfaces/ISinglyLinkedListNode.md b/docs/interfaces/ISinglyLinkedListNode.md index efee00f..e29c283 100644 --- a/docs/interfaces/ISinglyLinkedListNode.md +++ b/docs/interfaces/ISinglyLinkedListNode.md @@ -35,7 +35,7 @@ A reference to the next node, or "right" neighbor, from this node #### Defined in -[interfaces/ISinglyLinkedListNode.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ISinglyLinkedListNode.d.ts#L7) +[interfaces/ISinglyLinkedListNode.d.ts:7](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ISinglyLinkedListNode.d.ts#L7) ___ @@ -51,4 +51,4 @@ The value held within this node #### Defined in -[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/633ec9e/src/interfaces/ILinkedListNode.d.ts#L5) +[interfaces/ILinkedListNode.d.ts:5](https://github.com/Bytebit-Org/roblox-LinkedLists/blob/master/src/interfaces/ILinkedListNode.d.ts#L5) diff --git a/src/classes/lists/DoublyLinkedList.ts b/src/classes/lists/DoublyLinkedList.ts index aeeabed..8b855e0 100644 --- a/src/classes/lists/DoublyLinkedList.ts +++ b/src/classes/lists/DoublyLinkedList.ts @@ -322,6 +322,16 @@ export class DoublyLinkedList implements IDoublyLinkedList return this.tailNode?.value; } + public contains(value: T) { + for (const currentNode of this.getForwardValuesIterator()) { + if (currentNode === value) { + return true; + } + } + + return false; + } + public popHeadValue() { if (this.headNode === undefined) { return undefined; diff --git a/src/classes/lists/SinglyLinkedList.ts b/src/classes/lists/SinglyLinkedList.ts index d1c87a7..5d5fe30 100644 --- a/src/classes/lists/SinglyLinkedList.ts +++ b/src/classes/lists/SinglyLinkedList.ts @@ -283,6 +283,16 @@ export class SinglyLinkedList implements ISinglyLinkedList return this.tailNode?.value; } + public contains(value: T) { + for (const currentNode of this.getForwardValuesIterator()) { + if (currentNode === value) { + return true; + } + } + + return false; + } + public popHeadValue() { if (this.headNode === undefined) { return undefined; diff --git a/src/classes/lists/reusable-tests/UniversalLinkedListTests.ts b/src/classes/lists/reusable-tests/UniversalLinkedListTests.ts index d998df7..061b5ee 100644 --- a/src/classes/lists/reusable-tests/UniversalLinkedListTests.ts +++ b/src/classes/lists/reusable-tests/UniversalLinkedListTests.ts @@ -335,6 +335,20 @@ export function runUniversalLinkedListTests( }); }); + describe("contains", () => { + it("contains - should correctly find items", () => { + const arrayInput = ["a", "b", "c"]; + + const list = createList(); + + for (const item of arrayInput) { + expect(() => list.contains(item)).to.equal(true); + } + + expect(() => list.contains("d")).to.equal(false); + }); + }); + describe("peekValueAtTail", () => { it("peekValueAtTail - should change response after items are added and after the list is cleared", () => { const arrayInput = ["a", "b", "c"]; diff --git a/src/interfaces/IReadonlyLinkedList.d.ts b/src/interfaces/IReadonlyLinkedList.d.ts index a10c498..e44012f 100644 --- a/src/interfaces/IReadonlyLinkedList.d.ts +++ b/src/interfaces/IReadonlyLinkedList.d.ts @@ -46,6 +46,12 @@ export interface IReadonlyLinkedList { */ peekValueAtTail(): T | undefined; + /** + * Compares the value to each node, and returns if any were found to be equal + * @param value The value to compare against + */ + contains(value: T): boolean; + /** * Returns the total size of the list */