Module list

List Data structure that allows for fast removal at the cost of containing order.

Functions

List.new () Creates a new List.
List:__add (obj) Adds an object to the List.
List:__remove (obj) Removes an object from the List.
List:__clear () Clears the List completely.
List:has (obj) Returns true if the List has the object.
List:get (i) Returns the object at an index.
List:indexOf (obj) Returns the index of an object in the List.


Functions

List.new ()
Creates a new List.

Returns:

    A new List
List:__add (obj)
Adds an object to the List. Object must be of reference type Object may not be the string 'size'

Parameters:

  • obj Object to add

Returns:

    self
List:__remove (obj)
Removes an object from the List.

Parameters:

  • obj Object to remove

Returns:

    self
List:__clear ()
Clears the List completely.

Returns:

    self
List:has (obj)
Returns true if the List has the object.

Parameters:

  • obj Object to check for

Returns:

    True if the List has the object, false otherwise
List:get (i)
Returns the object at an index.

Parameters:

  • i Index to get from

Returns:

    Object at the index
List:indexOf (obj)
Returns the index of an object in the List.

Parameters:

  • obj Object to get index of

Returns:

    index of object in the List.
generated by LDoc 1.4.6 Last updated 2020-01-04 00:43:06