Class AbstractLuaValue<T extends Lua>

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T L  
      protected Lua.LuaType type  
    • Constructor Detail

      • AbstractLuaValue

        protected AbstractLuaValue​(T L,
                                   Lua.LuaType type)
    • Method Detail

      • state

        public Lua state()
        Specified by:
        state in interface LuaValue
        Returns:
        the Lua state where this Lua value lives
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map<LuaValue,​LuaValue>
        Overrides:
        equals in class java.util.AbstractMap<LuaValue,​LuaValue>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<LuaValue,​LuaValue>
        Overrides:
        hashCode in class java.util.AbstractMap<LuaValue,​LuaValue>
      • entrySet

        @NotNull
        public @NotNull java.util.Set<java.util.Map.Entry<LuaValue,​LuaValue>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<LuaValue,​LuaValue>
        Specified by:
        entrySet in class java.util.AbstractMap<LuaValue,​LuaValue>
      • length

        public int length()
        Description copied from interface: LuaTableTrait
        Returns the length of the array part of this Lua table.
        Specified by:
        length in interface LuaTableTrait
        Returns:
        the length as would be returned by the Lua # operator
      • get

        public LuaValue get​(int i)
        Specified by:
        get in interface LuaTableTrait
        Parameters:
        i - the index
        Returns:
        thisLuaValue[i]
      • get

        public LuaValue get​(java.lang.String key)
        Specified by:
        get in interface LuaTableTrait
        Parameters:
        key - the key
        Returns:
        thisLuaValue[key]
      • call

        public LuaValue[] call​(java.lang.Object... parameters)
        Description copied from interface: LuaValue
        Performs thisLuaValue(parameter1, parameter2, ...)
        Specified by:
        call in interface LuaValue
        Parameters:
        parameters - the parameters
        Returns:
        the return values, null on error
      • toNumber

        public double toNumber()
        Specified by:
        toNumber in interface LuaValue
      • toInteger

        public long toInteger()
        Specified by:
        toInteger in interface LuaValue
      • toBoolean

        public boolean toBoolean()
        Specified by:
        toBoolean in interface LuaValue
      • toProxy

        public <I> I toProxy​(java.lang.Class<I> targetInterface)
        Description copied from interface: LuaValue
        Creates a proxy from this value with Lua.createProxy(Class[], Lua.Conversion).
        Specified by:
        toProxy in interface LuaValue
        Parameters:
        targetInterface - the interfaces the proxy should implement.
        Returns:
        the proxy object
      • toProxy

        public java.lang.Object toProxy​(java.lang.Class<?>[] interfaces,
                                        Lua.Conversion degree)
        Description copied from interface: LuaValue
        Creates a proxy from this value with Lua.createProxy(Class[], Lua.Conversion).
        Specified by:
        toProxy in interface LuaValue
        Parameters:
        interfaces - the interfaces the proxy should implement.
        degree - the conversion used
        Returns:
        the proxy object