/** * Find the hashtable slot to use * @param key key to look for * @return slot to use */ private int hashSlot(LuaValue key) { return hashSlot( key, hash.length - 1 ); }
/** * Find the hashtable slot to use * @param key key to look for * @return slot to use */ private int hashSlot(LuaValue key) { return hashSlot( key, hash.length - 1 ); }
/** * Find the hashtable slot to use * @param key key to look for * @return slot to use */ private int hashSlot(LuaValue key) { return hashSlot( key, hash.length - 1 ); }
@Override public int keyindex( int mask ) { return hashSlot( key, mask ); }
public int keyindex( int mask ) { return hashSlot( key, mask ); }
public int keyindex( int mask ) { return hashSlot( key, mask ); }
@Override public int keyindex( int hashMask ) { return hashSlot( key, hashMask ); }
public int keyindex( int hashMask ) { return hashSlot( key, hashMask ); }
public int keyindex( int hashMask ) { return hashSlot( key, hashMask ); }
@Override public int keyindex( int mask ) { return LuaTable.hashSlot( strongkey(), mask ); }
public int keyindex( int mask ) { return LuaTable.hashSlot( strongkey(), mask ); }
public int keyindex( int mask ) { return LuaTable.hashSlot( strongkey(), mask ); }
protected LuaValue hashget(LuaValue key) { if ( hashEntries > 0 ) { for ( Slot slot = hash[ hashSlot(key) ]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find(key) ) != null ) { return foundSlot.value(); } } } return NIL; }
protected LuaValue hashget(LuaValue key) { if ( hashEntries > 0 ) { for ( Slot slot = hash[ hashSlot(key) ]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find(key) ) != null ) { return foundSlot.value(); } } } return NIL; }
private void hashRemove( LuaValue key ) { if ( hash.length > 0 ) { int index = hashSlot(key); for ( Slot slot = hash[index]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find( key ) ) != null ) { hash[index] = hash[index].remove( foundSlot ); --hashEntries; return; } } } }
protected LuaValue hashget(LuaValue key) { if ( hashEntries > 0 ) { for ( Slot slot = hash[ hashSlot(key) ]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find(key) ) != null ) { return foundSlot.value(); } } } return NIL; }
private void hashRemove( LuaValue key ) { if ( hash.length > 0 ) { int index = hashSlot(key); for ( Slot slot = hash[index]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find( key ) ) != null ) { hash[index] = hash[index].remove( foundSlot ); --hashEntries; return; } } } }
private void hashRemove( LuaValue key ) { if ( hash.length > 0 ) { int index = hashSlot(key); for ( Slot slot = hash[index]; slot != null; slot = slot.rest() ) { StrongSlot foundSlot; if ( ( foundSlot = slot.find( key ) ) != null ) { hash[index] = hash[index].remove( foundSlot ); --hashEntries; return; } } } }