Package party.iroiro.luajava.value
Class ImmutableLuaValue<T extends @Nullable Object>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Map<LuaValue,,LuaValue> LuaTableTrait,LuaValue
Basic
LuaValue implementation wrapping immutable values-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsFields inherited from class party.iroiro.luajava.value.AbstractLuaValue
L, type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedImmutableLuaValue(Lua L, Lua.LuaType type, T value) Creates a new ImmutableLuaValue. -
Method Summary
Modifier and TypeMethodDescriptionstatic LuaValueBUFFER(Lua L, ByteBuffer buffer) Creates a buffer/raw string Lua value.static LuaValueCreates a false boolean Lua value.static LuaValueCreates a number Lua value from a long.static LuaValueCreates a nil Lua value.static LuaValueCreates a number Lua value from a double.static LuaValueCreates a string Lua value.@Nullable ObjectConverts this Lua value to a Java object.toString()static LuaValueCreates a true boolean Lua value.Methods inherited from class party.iroiro.luajava.value.AbstractLuaValue
call, entrySet, equals, get, get, get, hashCode, length, set, set, state, toBoolean, toBuffer, toInteger, toNumber, toProxy, toProxy, typeMethods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, get, isEmpty, keySet, put, putAll, remove, size, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface party.iroiro.luajava.value.LuaTableTrait
get, put, sizeMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, values
-
Field Details
-
value
The wrapped immutable value.
-
-
Constructor Details
-
ImmutableLuaValue
Creates a new ImmutableLuaValue.- Parameters:
L- the Lua statetype- the Lua typevalue- the wrapped value
-
-
Method Details
-
toString
-
toJavaObject
Description copied from interface:LuaValueConverts this Lua value to a Java object.- Returns:
- a Java value converted from this Lua value
- See Also:
-
NIL
Creates a nil Lua value.- Parameters:
L- the Lua state- Returns:
- a nil Lua value
-
TRUE
Creates a true boolean Lua value.- Parameters:
L- the Lua state- Returns:
- a true Lua value
-
FALSE
Creates a false boolean Lua value.- Parameters:
L- the Lua state- Returns:
- a false Lua value
-
NUMBER
Creates a number Lua value from a double.- Parameters:
L- the Lua staten- the number value- Returns:
- a number Lua value
-
LONG
Creates a number Lua value from a long.- Parameters:
L- the Lua staten- the number value- Returns:
- a number Lua value
-
STRING
Creates a string Lua value.- Parameters:
L- the Lua states- the string value- Returns:
- a string Lua value
-
BUFFER
Creates a buffer/raw string Lua value.- Parameters:
L- the Lua statebuffer- the byte buffer- Returns:
- a buffer Lua value
-