Resolved some unchecked Types

This commit is contained in:
thatsIch
2014-09-28 22:20:14 +02:00
parent a745e00115
commit f1ffbf08a2
109 changed files with 206 additions and 206 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import appeng.core.AELog;
public class ConfigManager implements IConfigManager
{
HashMap<Enum, Enum> Settings = new HashMap();
HashMap<Enum, Enum> Settings = new HashMap<Enum, Enum>();
IConfigManagerHost target;
public ConfigManager(IConfigManagerHost tile) {
@@ -55,7 +55,7 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
}
else if ( te instanceof ArrayList )
{
return new AdaptorList( (ArrayList) te );
return new AdaptorList( (ArrayList<ItemStack>) te );
}
else if ( bs != null && bs.isStorageCrate( te ) )
{
+2 -2
View File
@@ -500,7 +500,7 @@ public class Platform
AELog.error( t );
}
return new ArrayList();
return new ArrayList<NBTBase>();
}
/*
@@ -1446,7 +1446,7 @@ public class Platform
static public <T extends IAEStack<T>> void postListChanges(IItemList<T> before, IItemList<T> after, IMEMonitorHandlerReceiver<T> meMonitorPassthrough,
BaseActionSource source)
{
LinkedList<T> changes = new LinkedList();
LinkedList<T> changes = new LinkedList<T>();
for (T is : before)
is.setStackSize( -is.getStackSize() );
@@ -15,7 +15,7 @@ public class ReadOnlyCollection<T> implements IReadOnlyCollection<T>
}
@Override
public Iterator iterator()
public Iterator<T> iterator()
{
return c.iterator();
}
@@ -90,7 +90,7 @@ public class AdaptorBCPipe extends InventoryAdaptor
@Override
public Iterator<ItemSlot> iterator()
{
return new NullIterator();
return new NullIterator<ItemSlot>();
}
}
@@ -180,6 +180,6 @@ public class AdaptorPlayerHand extends InventoryAdaptor
@Override
public Iterator<ItemSlot> iterator()
{
return new NullIterator();
return new NullIterator<ItemSlot>();
}
}
@@ -38,7 +38,7 @@ public class WrapperChainedInventory implements IInventory
{
if ( l.size() > 1 )
{
List<IInventory> newOrder = new ArrayList( l.size() );
List<IInventory> newOrder = new ArrayList<IInventory>( l.size() );
newOrder.add( l.get( l.size() - 1 ) );
for (int x = 0; x < l.size() - 1; x++)
newOrder.add( l.get( x ) );
@@ -122,7 +122,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
/*
* Shared Tag Compound Cache.
*/
private static WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>> sharedTagCompounds = new WeakHashMap();
private static WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>> sharedTagCompounds = new WeakHashMap<SharedSearchObject, WeakReference<SharedSearchObject>>();
/*
* Debug purposes.
+5 -5
View File
@@ -18,7 +18,7 @@ import appeng.api.storage.data.IItemList;
public final class ItemList<StackType extends IAEStack> implements IItemList<StackType>
{
private final TreeMap<StackType, StackType> records = new TreeMap();
private final TreeMap<StackType, StackType> records = new TreeMap<StackType, StackType>();
private final Class<? extends IAEStack> clz;
// private int currentPriority = Integer.MIN_VALUE;
@@ -154,9 +154,9 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
*/
@Override
synchronized public Iterator iterator()
synchronized public Iterator<StackType> iterator()
{
return new MeaningfulIterator( records.values().iterator() );
return new MeaningfulIterator<StackType>( records.values().iterator() );
}
@Override
@@ -197,7 +197,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
public Collection<StackType> findFuzzy(StackType filter, FuzzyMode fuzzy)
{
if ( checkStackType( filter ) )
return new ArrayList();
return new ArrayList<StackType>();
if ( filter instanceof IAEFluidStack )
return filter.equals( this ) ? (List<StackType>) Arrays.asList( new IAEFluidStack[] { (IAEFluidStack) filter } ) : (List<StackType>) Arrays
@@ -214,7 +214,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
}
else
{
Collection<StackType> output = new LinkedList();
Collection<StackType> output = new LinkedList<StackType>();
for (IAEItemStack is : or.getAEEquivalents())
output.addAll( findFuzzyDamage( (AEItemStack) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE ) );
@@ -53,7 +53,7 @@ public class OreHelper
}
HashMap<ItemRef, OreResult> references = new HashMap();
HashMap<ItemRef, OreResult> references = new HashMap<ItemRef, OreResult>();
public OreReference isOre(ItemStack ItemStack)
{
@@ -8,8 +8,8 @@ import appeng.api.storage.data.IAEStack;
public class MergedPriorityList<T extends IAEStack<T>> implements IPartitionList<T>
{
final List<IPartitionList<T>> positive = new ArrayList();
final List<IPartitionList<T>> negative = new ArrayList();
final List<IPartitionList<T>> positive = new ArrayList<IPartitionList<T>>();
final List<IPartitionList<T>> negative = new ArrayList<IPartitionList<T>>();
public void addNewList(IPartitionList<T> list, boolean isWhitelist)
{