Package party.iroiro.luajava.value
Class LuaTableValue
java.lang.Object
java.util.AbstractMap<LuaValue,LuaValue>
party.iroiro.luajava.value.AbstractLuaValue<Lua>
party.iroiro.luajava.value.AbstractRefLuaValue
party.iroiro.luajava.value.LuaTableValue
- All Implemented Interfaces:
Map<LuaValue,,LuaValue> party.iroiro.luajava.cleaner.LuaReferable,LuaTableTrait,LuaValue
-
Nested Class Summary
Nested ClassesNested 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
Fields inherited from class party.iroiro.luajava.value.AbstractLuaValue
L, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object key) entrySet()get(int i) Gets the value at the specified integer index from the table.Gets the value at the specified string key from the table.Gets the value at the specified Lua value key from the table.intlength()Returns the length of the array part of this Lua table.PerformsthisLuaValue[key] = valueSimilar toLuaTableTrait.set(Object, Object)Similar toLuaTableTrait.put(LuaValue, LuaValue), but handles other Java types as wellMethods inherited from class party.iroiro.luajava.value.AbstractRefLuaValue
call, getReference, push, toJavaObjectMethods inherited from class party.iroiro.luajava.value.AbstractLuaValue
equals, hashCode, state, toBoolean, toBuffer, toInteger, toNumber, toProxy, toProxy, typeMethods inherited from class java.util.AbstractMap
clear, clone, containsValue, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface party.iroiro.luajava.value.LuaTableTrait
sizeMethods inherited from interface party.iroiro.luajava.value.LuaValue
call, push, state, toBoolean, toBuffer, toInteger, toJavaObject, toNumber, toProxy, toProxy, toString, typeMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, values
-
Constructor Details
-
LuaTableValue
-
-
Method Details
-
length
public int length()Description copied from interface:LuaTableTraitReturns the length of the array part of this Lua table.- Specified by:
lengthin interfaceLuaTableTrait- Overrides:
lengthin classAbstractLuaValue<Lua>- Returns:
- the length as would be returned by the Lua
#operator
-
entrySet
-
containsKey
- Specified by:
containsKeyin interfaceMap<LuaValue,LuaValue> - Overrides:
containsKeyin classAbstractMap<LuaValue,LuaValue>
-
remove
-
put
Description copied from interface:LuaTableTraitPerformsthisLuaValue[key] = value- Specified by:
putin interfaceLuaTableTrait- Specified by:
putin interfaceMap<LuaValue,LuaValue> - Overrides:
putin classAbstractMap<LuaValue,LuaValue> - Parameters:
key- the keyvalue- the value- Returns:
- the old value
-
set
Description copied from interface:LuaTableTraitSimilar toLuaTableTrait.put(LuaValue, LuaValue), but handles other Java types as well- Specified by:
setin interfaceLuaTableTrait- Overrides:
setin classAbstractLuaValue<Lua>- Parameters:
key- the key, either aLuaValuetype or any Java objectvalue- the value, either aLuaValuetype or any Java object- Returns:
- the previous value
-
set
Description copied from interface:LuaTableTraitSimilar toLuaTableTrait.set(Object, Object)- Specified by:
setin interfaceLuaTableTrait- Overrides:
setin classAbstractLuaValue<Lua>- Parameters:
key- the keyvalue- the value, either aLuaValuetype or any Java object- Returns:
- the previous value
-
get
Description copied from interface:LuaTableTraitGets the value at the specified integer index from the table.- Specified by:
getin interfaceLuaTableTrait- Overrides:
getin classAbstractLuaValue<Lua>- Parameters:
i- the index- Returns:
thisLuaValue[i]
-
get
Description copied from interface:LuaTableTraitGets the value at the specified string key from the table.- Specified by:
getin interfaceLuaTableTrait- Overrides:
getin classAbstractLuaValue<Lua>- Parameters:
key- the key- Returns:
thisLuaValue[key]
-
get
Description copied from interface:LuaTableTraitGets the value at the specified Lua value key from the table.- Specified by:
getin interfaceLuaTableTrait- Overrides:
getin classAbstractLuaValue<Lua>- Parameters:
i- the key- Returns:
thisLuaValue[key]
-
get
-