Use interface for collections

This commit is contained in:
thatsIch 2015-05-17 23:51:57 +02:00
parent e626355aef
commit 72d85aecc9
2 changed files with 7 additions and 6 deletions

View file

@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -26,10 +26,10 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
@ -362,7 +362,7 @@ public class RecipeHandler implements IRecipeHandler
throw new IllegalStateException( "Recipes must now be loaded in Init." );
}
HashMap<Class, Integer> processed = new HashMap<Class, Integer>();
Map<Class, Integer> processed = new HashMap<Class, Integer>();
try
{
for( ICraftHandler ch : this.data.Handlers )

View file

@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -21,6 +21,7 @@ package appeng.recipes.game;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
@ -103,7 +104,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
throw new IllegalStateException( ret.toString() );
}
HashMap<Character, Object> itemMap = new HashMap<Character, Object>();
Map<Character, IIngredient> itemMap = new HashMap<Character, IIngredient>();
for(; idx < recipe.length; idx += 2 )
{
@ -112,7 +113,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
if( in instanceof IIngredient )
{
itemMap.put( chr, in );
itemMap.put( chr, (IIngredient) in );
}
else
{