Code example for Map

Methods: putAll

0
	} 
 
	@Override 
	// addes all map entries to the current scope map 
	public void putAll(Map<? extends String, ? extends Object> m) {
		scopes.getLast().putAll(m);
	} 
 
	@Override 
	// removes the scopes first object with the given key 
	public Object remove(Object key) {
		for (Iterator<Map<String, Object>> i = scopes.descendingIterator(); i.hasNext();) {
			Map<String, Object> scope = i.next();
			if (scope.containsKey(key)) {
				Object object = scope.get(key);
				scope.remove(key);
				return object;
			} 
		} 
		return null; 
	}