@Override
	public boolean isTrue(State state, String[] params) {
		
		ObjectInstance containerInstance = state.getObject(params[1]);
		int contentAmount = ContainerFactory.getContentNames(containerInstance).size();
		int neededAmount =  this.topLevelIngredient.getContents().size() 
				+ this.topLevelIngredient.getNecessaryTraits().size();
		
		if (contentAmount != neededAmount) {
			return false;
		}
		
		for (String name : ContainerFactory.getContentNames(containerInstance)) {
			ObjectInstance ingObj = state.getObject(name);
			IngredientRecipe ingredient = null;
			for (IngredientRecipe i : this.topLevelIngredient.getContents()) {
				if (i.getName().equals(name)) {
					ingredient = i;
					break;
				}
			}
			
			if (ingredient == null) {
				for (Entry<String, IngredientRecipe> entry : this.topLevelIngredient.getNecessaryTraits().entrySet()) {
					if (IngredientFactory.getTraits(ingObj).contains(entry.getKey())) {
						ingredient = entry.getValue();
						break;
					}
				}
				if (ingredient == null) {
					return false;
				}
			}
			if (!ingredient.AttributesMatch(ingObj)) {
				return false;
			}
		}
		
		return true;
	}