Class WeakTable

java.lang.Object
com.prineside.luaj.WeakTable
All Implemented Interfaces:
KryoSerializable

public class WeakTable extends Object implements KryoSerializable
Subclass of LuaTable that provides weak key and weak value semantics.

Normally these are not created directly, but indirectly when changing the mode of a LuaTable as lua script executes.

However, calling the constructors directly when weak tables are required from Java will reduce overhead.

  • Constructor Details

    • WeakTable

      public WeakTable(boolean weakkeys, boolean weakvalues, LuaValue backing)
      Construct a table with weak keys, weak values, or both
      Parameters:
      weakkeys - true to let the table have weak keys
      weakvalues - true to let the table have weak values
  • Method Details