Package com.prineside.luaj
Class WeakTable
java.lang.Object
com.prineside.luaj.WeakTable
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static final class
Internal class to implement weak userdata values.static class
Internal class to implement weak values.static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LuaTable
make
(boolean weakkeys, boolean weakvalues) void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) protected static LuaValue
strengthen
(Object ref) Unwrap a LuaValue from a WeakReference and/or WeakUserdata.boolean
boolean
protected static LuaValue
Self-sent message to convert a value to its weak counterpartvoid
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
-
Constructor Details
-
WeakTable
Construct a table with weak keys, weak values, or both- Parameters:
weakkeys
- true to let the table have weak keysweakvalues
- true to let the table have weak values
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
make
-
useWeakKeys
public boolean useWeakKeys() -
useWeakValues
public boolean useWeakValues() -
toLuaValue
-
entry
-
weaken
Self-sent message to convert a value to its weak counterpart- Parameters:
value
- value to convert- Returns:
LuaValue
that is a strong or weak reference, depending on type ofvalue
-
strengthen
Unwrap a LuaValue from a WeakReference and/or WeakUserdata.- Parameters:
ref
- reference to convert- Returns:
- LuaValue or null
- See Also:
-
wrap
-
arrayget
-