org.luaj.vm2
Class WeakTable.WeakSlot

java.lang.Object
  extended by org.luaj.vm2.WeakTable.WeakSlot
Enclosing class:
WeakTable

public abstract static class WeakTable.WeakSlot
extends java.lang.Object


Field Summary
protected  java.lang.Object key
           
protected  org.luaj.vm2.LuaTable.Slot next
           
protected  java.lang.Object value
           
 
Constructor Summary
protected WeakTable.WeakSlot(java.lang.Object key, java.lang.Object value, org.luaj.vm2.LuaTable.Slot next)
           
 
Method Summary
 org.luaj.vm2.LuaTable.Slot add(org.luaj.vm2.LuaTable.Slot entry)
          Link the given new entry to this slot.
 int arraykey(int max)
          Return first entry's key, iff it is an integer between 1 and max, inclusive, or zero otherwise.
protected abstract  WeakTable.WeakSlot copy(org.luaj.vm2.LuaTable.Slot next)
           
 org.luaj.vm2.LuaTable.StrongSlot find(LuaValue key)
          Compare given key with first()'s key; return first() if equal.
 org.luaj.vm2.LuaTable.StrongSlot first()
          Return first Entry, if still present, or null.
 boolean keyeq(LuaValue key)
          Compare given key with first()'s key; return true if equal.
abstract  int keyindex(int hashMask)
          Return hash{pow2,mod}( first().key().hashCode(), sizeMask )
 org.luaj.vm2.LuaTable.Slot relink(org.luaj.vm2.LuaTable.Slot rest)
          Return a Slot with the same first key and value (if still present) and rest() equal to rest.
 org.luaj.vm2.LuaTable.Slot remove(org.luaj.vm2.LuaTable.StrongSlot target)
          Return a Slot with the given value set to nil; must not return null for next() to behave correctly.
 org.luaj.vm2.LuaTable.Slot rest()
          Return rest of elements
 org.luaj.vm2.LuaTable.Slot set(org.luaj.vm2.LuaTable.StrongSlot target, LuaValue value)
          Set the value of this Slot's first Entry, if possible, or return a new Slot whose first entry has the given value.
abstract  org.luaj.vm2.LuaTable.Slot set(LuaValue value)
           
 LuaValue strongkey()
           
 LuaValue strongvalue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected java.lang.Object key

value

protected java.lang.Object value

next

protected org.luaj.vm2.LuaTable.Slot next
Constructor Detail

WeakTable.WeakSlot

protected WeakTable.WeakSlot(java.lang.Object key,
                             java.lang.Object value,
                             org.luaj.vm2.LuaTable.Slot next)
Method Detail

keyindex

public abstract int keyindex(int hashMask)
Return hash{pow2,mod}( first().key().hashCode(), sizeMask )


set

public abstract org.luaj.vm2.LuaTable.Slot set(LuaValue value)

first

public org.luaj.vm2.LuaTable.StrongSlot first()
Return first Entry, if still present, or null.


find

public org.luaj.vm2.LuaTable.StrongSlot find(LuaValue key)
Compare given key with first()'s key; return first() if equal.


keyeq

public boolean keyeq(LuaValue key)
Compare given key with first()'s key; return true if equal. May return true for keys no longer present in the table.


rest

public org.luaj.vm2.LuaTable.Slot rest()
Return rest of elements


arraykey

public int arraykey(int max)
Return first entry's key, iff it is an integer between 1 and max, inclusive, or zero otherwise.


set

public org.luaj.vm2.LuaTable.Slot set(org.luaj.vm2.LuaTable.StrongSlot target,
                                      LuaValue value)
Set the value of this Slot's first Entry, if possible, or return a new Slot whose first entry has the given value.


add

public org.luaj.vm2.LuaTable.Slot add(org.luaj.vm2.LuaTable.Slot entry)
Link the given new entry to this slot.


remove

public org.luaj.vm2.LuaTable.Slot remove(org.luaj.vm2.LuaTable.StrongSlot target)
Return a Slot with the given value set to nil; must not return null for next() to behave correctly.


relink

public org.luaj.vm2.LuaTable.Slot relink(org.luaj.vm2.LuaTable.Slot rest)
Return a Slot with the same first key and value (if still present) and rest() equal to rest.


strongkey

public LuaValue strongkey()

strongvalue

public LuaValue strongvalue()

copy

protected abstract WeakTable.WeakSlot copy(org.luaj.vm2.LuaTable.Slot next)


Copyright © 2007-2015 Luaj.org. All Rights Reserved.