Class HashMap

A structure for storing a simple key-value table but it also keeps track of how many pairs are in the table.

Info:

  • License: MIT
  • Author: Richard Voelker

Methods

HashMap.new (self, t) Create the HashMap.
HashMap.pairs (self)
HashMap.Length (self) Alias for the __len metamethod.


Methods

HashMap.new (self, t)
Create the HashMap. Values are stored and retrieved as if this were a normal table.

Parameters:

Returns:

    iterator The pairs iterator over the table.
HashMap.pairs (self)

Parameters:

  • self

Returns:

    iterator The pairs iterator over the table.
HashMap.Length (self)
Alias for the __len metamethod. Since the __len metamethod is not supported in Lua 5.1 (the current version on ROBLOX), this can be used instead.

Parameters:

  • self

Returns:

    integer The number of key-value pairs in the table.
generated by LDoc 1.4.3 Last updated 2016-07-26 17:10:04