class Scope {

	public synchronized final void add(Scope<T> scope) {
		Ensure.not_null(scope);
		Ensure.is_null(scope.m_parent);
		
		// Unnamed scopes cannot be placed inside other scopes.
		Ensure.not_null(scope.m_name);
		
		if (m_objects.get(scope.m_name) != null) {
			throw new IllegalStateException("Scope already has an object "
					+ "named '" + scope.m_name + "'.");
		}
		
		if (m_sub_scopes.get(scope.m_name) != null) {
			throw new IllegalStateException("Scope already has a sub scope "
					+ "named '" + scope.m_name + "'.");
		}
		
		check_add(scope);
		
		m_sub_scopes.put(scope.m_name, scope);
		scope.m_parent = this;
	}

	public  Scope(String name);

}