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 classstatic classstatic classstatic final classInternal class to implement weak userdata values.static classInternal class to implement weak values.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LuaTablemake(boolean weakkeys, boolean weakvalues) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) protected static LuaValuestrengthen(Object ref) Unwrap a LuaValue from a WeakReference and/or WeakUserdata.booleanbooleanprotected static LuaValueSelf-sent message to convert a value to its weak counterpartvoidwrite(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:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin 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:
LuaValuethat 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
-