org.jruby.util.collections
Class SlottedHashMap
java.lang.Object
org.jruby.util.collections.SlottedHashMap
- All Implemented Interfaces:
- java.util.Map
- public class SlottedHashMap
- extends java.lang.Object
- implements java.util.Map
Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
SlottedHashMap
public SlottedHashMap(java.lang.Object owner)
SlottedHashMap
public SlottedHashMap(java.lang.Object owner,
SlottedHashMap smap)
addChild
public void addChild(SlottedHashMap smap)
setParent
public void setParent(SlottedHashMap smap)
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Put a new value into this SHM. If the key provided was originally slotted by a parent,
that association will be replaced. If no parents have provided an association we create a new one.
- Specified by:
put
in interface java.util.Map
- Parameters:
key
- value
-
- Returns:
put
protected java.lang.Object put(java.lang.Object key,
java.lang.Object value,
SlottedHashMap parent)
- Potentially insert the given key and value, if we have not already overridden it
- Parameters:
key
- value
- parent
-
- Returns:
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get
in interface java.util.Map
getSlot
public SlottedHashMap.Slot getSlot(java.lang.Object key)
size
public int size()
- Specified by:
size
in interface java.util.Map
clear
public void clear()
- Specified by:
clear
in interface java.util.Map
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface java.util.Map
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interface java.util.Map
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interface java.util.Map
values
public java.util.Collection values()
- Specified by:
values
in interface java.util.Map
putAll
public void putAll(java.util.Map t)
- Specified by:
putAll
in interface java.util.Map
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interface java.util.Map
keySet
public java.util.Set keySet()
- Specified by:
keySet
in interface java.util.Map
remove
public java.lang.Object remove(java.lang.Object key)
- Specified by:
remove
in interface java.util.Map
remove
protected void remove(java.lang.Object key,
SlottedHashMap parent)
getOwner
public java.lang.Object getOwner()
Copyright © 2002-2007 JRuby Team. All Rights Reserved.