code: @SuppressWarnings("unchecked")
  	public <T> DatagraphEnvironment setInstance(Class<T> type, T value) {
  		((Map<Class<T>, T>) instances).put(type, value);
  		return this;
  	}
docs: Sets the specified instance for the given key (instance type).
  
  @param type  instance type
  @param value instance
  @param <T>   type of the instance
  @return this environment