Merge pull request #175 from thatsIch/TypeSafety

Type safety
This commit is contained in:
Chris 2014-09-28 19:51:31 -07:00
commit 62fcf26fcc
111 changed files with 237 additions and 239 deletions

View file

@ -281,7 +281,7 @@ public class ClientHelper extends ServerHelper
{
if ( Platform.isClient() )
{
List<EntityPlayer> o = new ArrayList();
List<EntityPlayer> o = new ArrayList<EntityPlayer>();
o.add( Minecraft.getMinecraft().thePlayer );
return o;
}

View file

@ -177,7 +177,7 @@ public abstract class AEBaseGui extends GuiContainer
Slot bl_clicked;
// drag y
Set<Slot> drag_click = new HashSet();
Set<Slot> drag_click = new HashSet<Slot>();
@Override
protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int key)

View file

@ -46,7 +46,7 @@ public class GuiCraftConfirm extends AEBaseGui
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
List<IAEItemStack> visual = new ArrayList();
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiBridge OriginalGui;
@ -382,7 +382,7 @@ public class GuiCraftConfirm extends AEBaseGui
int viewEnd = viewStart + 3 * rows;
String dspToolTip = "";
List<String> lineList = new LinkedList();
List<String> lineList = new LinkedList<String>();
int toolPosX = 0;
int toolPosY = 0;

View file

@ -39,14 +39,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
List<IAEItemStack> visual = new ArrayList();
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
public void clearItems()
{
storage = AEApi.instance().storage().createItemList();
active = AEApi.instance().storage().createItemList();
pending = AEApi.instance().storage().createItemList();
visual = new ArrayList();
visual = new ArrayList<IAEItemStack>();
}
protected GuiCraftingCPU(ContainerCraftingCPU container) {
@ -269,7 +269,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int viewEnd = viewStart + 3 * 6;
String dspToolTip = "";
List<String> lineList = new LinkedList();
List<String> lineList = new LinkedList<String>();
int toolPosX = 0;
int toolPosY = 0;

View file

@ -25,11 +25,11 @@ import com.google.common.collect.HashMultimap;
public class GuiInterfaceTerminal extends AEBaseGui
{
HashMap<Long, ClientDCInternalInv> byId = new HashMap();
HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
ArrayList<String> names = new ArrayList();
ArrayList<String> names = new ArrayList<String>();
ArrayList<Object> lines = new ArrayList();
ArrayList<Object> lines = new ArrayList<Object>();
private int getTotalRows()
{
@ -43,7 +43,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
ySize = 222;
}
LinkedList<SlotDisconnected> dcSlots = new LinkedList();
LinkedList<SlotDisconnected> dcSlots = new LinkedList<SlotDisconnected>();
@Override
public void initGui()
@ -178,12 +178,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
Collections.sort( names );
lines = new ArrayList( getTotalRows() );
lines = new ArrayList<Object>( getTotalRows() );
for (String n : names)
{
lines.add( n );
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList();
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
clientInventories.addAll( byName.get( n ) );
Collections.sort( clientInventories );

View file

@ -101,7 +101,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
if ( Appearances == null )
{
Appearances = new HashMap();
Appearances = new HashMap<EnumPair, BtnAppearance>();
registerApp( 16 * 7 + 0, Settings.CONDENSER_OUTPUT, CondenserOutput.TRASH, ButtonToolTips.CondenserOutput, ButtonToolTips.Trash );
registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOutput.MATTER_BALLS, ButtonToolTips.CondenserOutput, ButtonToolTips.MatterBalls );
registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOutput.SINGULARITY, ButtonToolTips.CondenserOutput, ButtonToolTips.Singularity );

View file

@ -29,7 +29,7 @@ public class BusRenderer implements IItemRenderer
public static final BusRenderer instance = new BusRenderer();
public RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
public static final HashMap<Integer, IPart> renderPart = new HashMap();
public static final HashMap<Integer, IPart> renderPart = new HashMap<Integer, IPart>();
public IPart getRenderer(ItemStack is, IPartItem c)
{

View file

@ -106,7 +106,7 @@ public class CableRenderHelper
/**
* snag list of boxes...
*/
List<AxisAlignedBB> boxes = new ArrayList();
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
for (ForgeDirection s : ForgeDirection.values())
{
IPart part = cableBusContainer.getPart( s );

View file

@ -23,7 +23,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
public static final WorldRender instance = new WorldRender();
boolean hasError = false;
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap();
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
void setRender(AEBaseBlock in, BaseBlockRender r)
{

View file

@ -72,7 +72,7 @@ public abstract class AEBaseContainer extends Container
int ticksSinceCheck = 900;
IAEItemStack clientRequestedTargetItem = null;
List<PacketPartialItem> dataChunks = new LinkedList();
List<PacketPartialItem> dataChunks = new LinkedList<PacketPartialItem>();
public void postPartial(PacketPartialItem packetPartialItem)
{
@ -129,7 +129,7 @@ public abstract class AEBaseContainer extends Container
CompressedStreamTools.writeCompressed( item, stream );
int maxChunkSize = 30000;
List<byte[]> miniPackets = new LinkedList();
List<byte[]> miniPackets = new LinkedList<byte[]>();
byte[] data = stream.toByteArray();
@ -216,7 +216,7 @@ public abstract class AEBaseContainer extends Container
public ContainerOpenContext openContext;
protected IMEInventoryHandler<IAEItemStack> cellInv;
protected HashSet<Integer> locked = new HashSet();
protected HashSet<Integer> locked = new HashSet<Integer>();
protected IEnergySource powerSrc;
public void lockPlayerInventorySlot(int idx)
@ -772,7 +772,7 @@ public abstract class AEBaseContainer extends Container
if ( action == InventoryAction.MOVE_REGION )
{
List<Slot> from = new LinkedList();
List<Slot> from = new LinkedList<Slot>();
for (Object j : inventorySlots)
{

View file

@ -76,7 +76,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
protected long cpuIdx = Long.MIN_VALUE;
public ArrayList<CraftingCPURecord> cpus = new ArrayList();
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
public ContainerCraftConfirm(InventoryPlayer ip, ITerminalHost te) {
super( ip, te );

View file

@ -23,7 +23,7 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
@GuiSync(7)
public String myName = "";
public ArrayList<CraftingCPURecord> cpus = new ArrayList();
public ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
private void sendCPUs()
{

View file

@ -61,8 +61,8 @@ public class ContainerInterfaceTerminal extends AEBaseContainer
}
Map<IInterfaceHost, InvTracker> diList = new HashMap();
Map<Long, InvTracker> byId = new HashMap();
Map<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>();
Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>();
IGrid g;
public ContainerInterfaceTerminal(InventoryPlayer ip, PartMonitor anchor) {

View file

@ -259,7 +259,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
}
else
{
List<ItemStack> list = new ArrayList( 3 );
List<ItemStack> list = new ArrayList<ItemStack>( 3 );
boolean hasValue = false;
for (int x = 0; x < outputSlots.length; x++)

View file

@ -149,7 +149,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
public void postCraft(EntityPlayer p, IMEMonitor<IAEItemStack> inv, ItemStack set[], ItemStack result)
{
List<ItemStack> drops = new ArrayList();
List<ItemStack> drops = new ArrayList<ItemStack>();
// add one of each item to the items on the board...
if ( Platform.isServer() )
@ -219,7 +219,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
ItemStack extra = ia.addItems( craftItem( who, rs, inv, all ) );
if ( extra != null )
{
List<ItemStack> drops = new ArrayList();
List<ItemStack> drops = new ArrayList<ItemStack>();
drops.add( extra );
Platform.spawnDrops( who.worldObj, (int) who.posX, (int) who.posY, (int) who.posZ, drops );
return;

View file

@ -53,7 +53,7 @@ public class AppEng
public final static String modid = "appliedenergistics2";
public final static String name = "Applied Energistics 2";
HashMap<String, IIMCHandler> IMCHandlers = new HashMap();
HashMap<String, IIMCHandler> IMCHandlers = new HashMap<String, IIMCHandler>();
public static AppEng instance;

View file

@ -224,7 +224,7 @@ public class WorldSettings extends Configuration
instance = null;
}
List<Integer> storageCellDims = new ArrayList();
List<Integer> storageCellDims = new ArrayList<Integer>();
HashMap<Integer, UUID> idToUUID;
public void addStorageCellDim(int newDim)
@ -317,7 +317,7 @@ public class WorldSettings extends Configuration
save();
}
private WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>> loadedStorage = new WeakHashMap();
private WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>> loadedStorage = new WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>>();
public WorldCoord getStoredSize(int dim)
{

View file

@ -44,12 +44,12 @@ public class ApiPart implements IPartHelper
int classNum = 1;
HashMap<String, Class> TileImplementations = new HashMap();
HashMap<String, ClassNode> readerCache = new HashMap();
HashMap<Class, String> interfaces2Layer = new HashMap();
HashMap<String, Class> roots = new HashMap();
HashMap<String, Class> TileImplementations = new HashMap<String, Class>();
HashMap<String, ClassNode> readerCache = new HashMap<String, ClassNode>();
HashMap<Class, String> interfaces2Layer = new HashMap<Class, String>();
HashMap<String, Class> roots = new HashMap<String, Class>();
List<String> desc = new LinkedList();
List<String> desc = new LinkedList<String>();
public void initFMPSupport()
{

View file

@ -40,13 +40,13 @@ public class ApiStorage implements IStorageHelper
@Override
public IItemList<IAEItemStack> createItemList()
{
return new ItemList( IAEItemStack.class );
return new ItemList<IAEItemStack>( IAEItemStack.class );
}
@Override
public IItemList<IAEFluidStack> createFluidList()
{
return new ItemList( IAEFluidStack.class );
return new ItemList<IAEFluidStack>( IAEFluidStack.class );
}
@Override

View file

@ -16,7 +16,7 @@ public class CellRegistry implements ICellRegistry
List<ICellHandler> handlers;
public CellRegistry() {
handlers = new ArrayList();
handlers = new ArrayList<ICellHandler>();
}
@Override

View file

@ -18,7 +18,7 @@ public class ExternalStorageRegistry implements IExternalStorageRegistry
final ExternalIInv lastHandler = new ExternalIInv();
public ExternalStorageRegistry() {
Handlers = new ArrayList();
Handlers = new ArrayList<IExternalStorageHandler>();
}
@Override

View file

@ -11,7 +11,7 @@ import appeng.core.AELog;
public class GridCacheRegistry implements IGridCacheRegistry
{
final private HashMap<Class<? extends IGridCache>, Class<? extends IGridCache>> caches = new HashMap();
final private HashMap<Class<? extends IGridCache>, Class<? extends IGridCache>> caches = new HashMap<Class<? extends IGridCache>, Class<? extends IGridCache>>();
@Override
public void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation)
@ -25,7 +25,7 @@ public class GridCacheRegistry implements IGridCacheRegistry
@Override
public HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid g)
{
HashMap<Class<? extends IGridCache>, IGridCache> map = new HashMap();
HashMap<Class<? extends IGridCache>, IGridCache> map = new HashMap<Class<? extends IGridCache>, IGridCache>();
for (Class<? extends IGridCache> iface : caches.keySet())
{

View file

@ -31,7 +31,7 @@ public class GrinderRecipeManager implements IGrinderRegistry, IOreListener
}
public GrinderRecipeManager() {
RecipeList = new ArrayList();
RecipeList = new ArrayList<IGrinderEntry>();
addOre( "Coal", new ItemStack( Items.coal ) );
addOre( "Charcoal", new ItemStack( Items.coal, 1, 1 ) );

View file

@ -32,7 +32,7 @@ public class LocatableRegistry implements ILocatableRegistry
}
public LocatableRegistry() {
set = new HashMap();
set = new HashMap<Long, ILocatable>();
MinecraftForge.EVENT_BUS.register( this );
}

View file

@ -15,7 +15,7 @@ import appeng.spatial.DefaultSpatialHandler;
public class MovableTileRegistry implements IMovableRegistry
{
private HashSet<Block> blacklisted = new HashSet();
private HashSet<Block> blacklisted = new HashSet<Block>();
private HashMap<Class<? extends TileEntity>, IMovableHandler> Valid = new HashMap<Class<? extends TileEntity>, IMovableHandler>();
private LinkedList<Class<? extends TileEntity>> test = new LinkedList<Class<? extends TileEntity>>();

View file

@ -18,7 +18,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
public class P2PTunnelRegistry implements IP2PTunnelRegistry
{
HashMap<ItemStack, TunnelType> Tunnels = new HashMap();
HashMap<ItemStack, TunnelType> Tunnels = new HashMap<ItemStack, TunnelType>();
public ItemStack getModItem(String modID, String Name, int meta)
{

View file

@ -19,7 +19,7 @@ public class WirelessRegistry implements IWirelessTermRegistry
List<IWirelessTermHandler> handlers;
public WirelessRegistry() {
handlers = new ArrayList();
handlers = new ArrayList<IWirelessTermHandler>();
}
@Override

View file

@ -12,8 +12,8 @@ public class WorldGenRegistry implements IWorldGen
private class TypeSet
{
HashSet<Class<? extends WorldProvider>> badProviders = new HashSet();
HashSet<Integer> badDimensions = new HashSet();
HashSet<Class<? extends WorldProvider>> badProviders = new HashSet<Class<? extends WorldProvider>>();
HashSet<Integer> badDimensions = new HashSet<Integer>();
}

View file

@ -124,7 +124,7 @@ public class PlayerStatsRegistration
/**
* register
*/
ArrayList<Achievement> list = new ArrayList();
ArrayList<Achievement> list = new ArrayList<Achievement>();
for (Achievements a : Achievements.values())
{

View file

@ -47,7 +47,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
public PacketMEInventoryUpdate(final ByteBuf stream) throws IOException {
data = null;
compressFrame = null;
list = new LinkedList();
list = new LinkedList<IAEItemStack>();
ref = stream.readByte();
// int originalBytes = stream.readableBytes();

View file

@ -51,7 +51,7 @@ public class CraftingJob implements Runnable, ICraftingJob
{
world = wrapWorld( w );
storage = AEApi.instance().storage().createItemList();
prophecies = new HashSet();
prophecies = new HashSet<IAEItemStack>();
original = null;
availableCheck = null;
}
@ -71,7 +71,7 @@ public class CraftingJob implements Runnable, ICraftingJob
world = wrapWorld( w );
output = what.copy();
storage = AEApi.instance().storage().createItemList();
prophecies = new HashSet();
prophecies = new HashSet<IAEItemStack>();
this.actionSrc = actionSrc;
this.callback = callback;
@ -129,7 +129,7 @@ public class CraftingJob implements Runnable, ICraftingJob
public long times = 0;
}
HashMap<String, twoIntegers> opsAndMultiplier = new HashMap();
HashMap<String, twoIntegers> opsAndMultiplier = new HashMap<String, twoIntegers>();
@Override
public void run()

View file

@ -30,7 +30,7 @@ public class CraftingTreeNode
private IAEItemStack what;
// what are the crafting patterns for this?
private ArrayList<CraftingTreeProcess> nodes = new ArrayList();
private ArrayList<CraftingTreeProcess> nodes = new ArrayList<CraftingTreeProcess>();
boolean canEmit = false;
boolean cannotUse = false;
@ -95,7 +95,7 @@ public class CraftingTreeNode
{
job.handlePausing();
List<IAEItemStack> thingsUsed = new LinkedList();
List<IAEItemStack> thingsUsed = new LinkedList<IAEItemStack>();
what.setStackSize( l );
if ( slot >= 0 && parent != null && parent.details.isCraftable() )

View file

@ -36,7 +36,7 @@ public class CraftingTreeProcess
private long bytes = 0;
final private int depth;
Map<CraftingTreeNode, Long> nodes = new HashMap();
Map<CraftingTreeNode, Long> nodes = new HashMap<CraftingTreeNode, Long>();
public boolean possible = true;
public CraftingTreeProcess(ICraftingGrid cc, CraftingJob job, ICraftingPatternDetails details, CraftingTreeNode craftingTreeNode, int depth, World world) {

View file

@ -49,17 +49,17 @@ public class CraftingWatcher implements ICraftingWatcher
}
CraftingGridCache gsc;
ICraftingWatcherHost myObject;
HashSet<IAEStack> myInterests = new HashSet();
ICraftingWatcherHost host;
HashSet<IAEStack> myInterests = new HashSet<IAEStack>();
public CraftingWatcher(CraftingGridCache cache, ICraftingWatcherHost host) {
gsc = cache;
myObject = host;
this.host = host;
}
public ICraftingWatcherHost getHost()
{
return myObject;
return host;
}
@Override

View file

@ -14,7 +14,7 @@ import appeng.tile.AEBaseTile;
public class TileItemGen extends AEBaseTile implements IInventory
{
public static Queue<ItemStack> possibleItems = new LinkedList();
public static Queue<ItemStack> possibleItems = new LinkedList<ItemStack>();
public TileItemGen() {
if ( possibleItems.isEmpty() )

View file

@ -84,7 +84,7 @@ public class ToolDebugCard extends AEBaseItem
{
int length = 0;
HashSet<IGridNode> next = new HashSet();
HashSet<IGridNode> next = new HashSet<IGridNode>();
next.add( node );
int maxLength = 10000;
@ -92,7 +92,7 @@ public class ToolDebugCard extends AEBaseItem
outer: while ( ! next.isEmpty() )
{
HashSet<IGridNode> current = next;
next = new HashSet();
next = new HashSet<IGridNode>();
for ( IGridNode n : current )
{

View file

@ -34,14 +34,14 @@ public class ToolEraser extends AEBaseItem
int meta = world.getBlockMetadata( x, y, z );
int blocks = 0;
List<WorldCoord> next = new LinkedList();
List<WorldCoord> next = new LinkedList<WorldCoord>();
next.add( new WorldCoord( x, y, z ) );
while (blocks < 90000 && !next.isEmpty())
{
List<WorldCoord> c = next;
next = new LinkedList();
next = new LinkedList<WorldCoord>();
for (WorldCoord wc : c)
{

View file

@ -106,7 +106,7 @@ final public class EntityChargedQuartz extends EntityItem
if ( netherQuartz.getEntityItem().stackSize <= 0 )
netherQuartz.setDead();
List<ItemStack> i = new ArrayList();
List<ItemStack> i = new ArrayList<ItemStack>();
i.add( AEApi.instance().materials().materialFluixCrystal.stack( 1 ) );
ItemStack Output = AEApi.instance().materials().materialFluixCrystal.stack( 2 );

View file

@ -314,7 +314,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
{
if ( !(side == null || side == ForgeDirection.UNKNOWN || tile() == null) )
{
List<AxisAlignedBB> boxes = new ArrayList();
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
fp.getBoxes( bch, null );
for (AxisAlignedBB bb : boxes)
@ -341,7 +341,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
IPart bp = bi.createPartFromItemStack( is );
if ( !(side == null || side == ForgeDirection.UNKNOWN || tile() == null) )
{
List<AxisAlignedBB> boxes = new ArrayList();
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
bp.getBoxes( bch );
for (AxisAlignedBB bb : boxes)
@ -411,7 +411,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
@Override
public Iterable<Cuboid6> getCollisionBoxes()
{
LinkedList l = new LinkedList();
LinkedList<Cuboid6> l = new LinkedList<Cuboid6>();
for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( false, true, null, false ))
{
l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
@ -423,7 +423,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
@Override
public Iterable<IndexedCuboid6> getSubParts()
{
LinkedList<IndexedCuboid6> l = new LinkedList();
LinkedList<IndexedCuboid6> l = new LinkedList<IndexedCuboid6>();
for (Cuboid6 c : getCollisionBoxes())
{
l.add( new IndexedCuboid6( 0, c ) );
@ -434,7 +434,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
@Override
public Iterable<Cuboid6> getOcclusionBoxes()
{
LinkedList l = new LinkedList();
LinkedList<Cuboid6> l = new LinkedList<Cuboid6>();
for (AxisAlignedBB b : cb.getSelectedBoundingBoxesFromPool( true, disableFacadeOcclusion.get() == null, null, true ))
{
l.add( new Cuboid6( b.minX, b.minY, b.minZ, b.maxX, b.maxY, b.maxZ ) );
@ -543,7 +543,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds
ForgeDirection dir = ForgeDirection.getOrientation( side );
if ( cable != null && cable.isConnected( dir ) )
{
List<AxisAlignedBB> boxes = new ArrayList();
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
BusCollisionHelper bch = new BusCollisionHelper( boxes, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH, null, true );

View file

@ -169,7 +169,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
if ( details != null )
{
if ( craftingList == null )
craftingList = new LinkedList();
craftingList = new LinkedList<ICraftingPatternDetails>();
craftingList.add( details );
}
@ -182,7 +182,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
return;
if ( waitingToSend == null )
waitingToSend = new LinkedList();
waitingToSend = new LinkedList<ItemStack>();
waitingToSend.add( is );
@ -513,8 +513,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
return patterns;
}
MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<IAEItemStack>( new NullInventory(), StorageChannel.ITEMS );
MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<IAEFluidStack>( new NullInventory(), StorageChannel.FLUIDS );
MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<IAEItemStack>( new NullInventory<IAEItemStack>(), StorageChannel.ITEMS );
MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<IAEFluidStack>( new NullInventory<IAEFluidStack>(), StorageChannel.FLUIDS );
public void gridChanged()
{
@ -525,8 +525,8 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
}
catch (GridAccessException gae)
{
items.setInternal( new NullInventory() );
fluids.setInternal( new NullInventory() );
items.setInternal( new NullInventory<IAEItemStack>() );
fluids.setInternal( new NullInventory<IAEFluidStack>() );
}
notifyNeighbors();
@ -996,7 +996,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
craftingTracker.jobStateChange( link );
}
static final Set<Block> badBlocks = new HashSet();
static final Set<Block> badBlocks = new HashSet<Block>();
public String getTermName()
{

View file

@ -372,8 +372,8 @@ public class MeteoritePlacer
}
int minBLocks = 200;
HashSet<Block> validSpawn = new HashSet();
HashSet<Block> invalidSpawn = new HashSet();
HashSet<Block> validSpawn = new HashSet<Block>();
HashSet<Block> invalidSpawn = new HashSet<Block>();
Fallout type = new Fallout();
@ -694,7 +694,7 @@ public class MeteoritePlacer
ap.addItems( AEApi.instance().blocks().blockSkyStone.stack( (int) (Math.random() * 12) + 1 ) );
break;
case 1:
List<ItemStack> possibles = new LinkedList();
List<ItemStack> possibles = new LinkedList<ItemStack>();
possibles.addAll( OreDictionary.getOres( "nuggetIron" ) );
possibles.addAll( OreDictionary.getOres( "nuggetCopper" ) );
possibles.addAll( OreDictionary.getOres( "nuggetTin" ) );

View file

@ -79,8 +79,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
ACCEPT, DECLINE, TEST
}
HashSet<TestLookup> failCache = new HashSet();
HashSet<TestLookup> passCache = new HashSet();
HashSet<TestLookup> failCache = new HashSet<TestLookup>();
HashSet<TestLookup> passCache = new HashSet<TestLookup>();
private void markItemAs(int slotIndex, ItemStack i, TestStatus b)
{
@ -122,8 +122,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
patternItem = is;
pattern = AEItemStack.create( is );
List<IAEItemStack> in = new ArrayList();
List<IAEItemStack> out = new ArrayList();
List<IAEItemStack> in = new ArrayList<IAEItemStack>();
List<IAEItemStack> out = new ArrayList<IAEItemStack>();
for (int x = 0; x < inTag.tagCount(); x++)
{

View file

@ -44,7 +44,7 @@ public class CompassManager
}
HashMap<CompassRequest, CompassResult> requests = new HashMap();
HashMap<CompassRequest, CompassResult> requests = new HashMap<CompassRequest, CompassResult>();
public void postResult(long attunement, int x, int y, int z, CompassResult result)
{

View file

@ -43,13 +43,13 @@ public class TickHandler
class HandlerRep
{
public Queue<AEBaseTile> tiles = new LinkedList();
public Queue<AEBaseTile> tiles = new LinkedList<AEBaseTile>();
public Collection<Grid> networks = new NetworkList();
public void clear()
{
tiles = new LinkedList();
tiles = new LinkedList<AEBaseTile>();
networks = new NetworkList();
}
@ -83,8 +83,8 @@ public class TickHandler
}
final private HashMap<Integer, PlayerColor> cliPlayerColors = new HashMap();
final private HashMap<Integer, PlayerColor> srvPlayerColors = new HashMap();
final private HashMap<Integer, PlayerColor> cliPlayerColors = new HashMap<Integer, PlayerColor>();
final private HashMap<Integer, PlayerColor> srvPlayerColors = new HashMap<Integer, PlayerColor>();
public HashMap<Integer, PlayerColor> getPlayerColors()
{
@ -159,7 +159,7 @@ public class TickHandler
{
if ( Platform.isServer() ) // for no there is no reason to care about this on the client...
{
LinkedList<IGridNode> toDestroy = new LinkedList();
LinkedList<IGridNode> toDestroy = new LinkedList<IGridNode>();
for (Grid g : getRepo().networks)
{

View file

@ -17,7 +17,7 @@ public class AEGenericSchematicTile extends SchematicTile
public void writeRequirementsToBlueprint(IBuilderContext context, int x, int y, int z)
{
TileEntity tile = context.world().getTileEntity( x, y, z );
ArrayList<ItemStack> list = new ArrayList();
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
if ( tile instanceof AEBaseTile )
{
AEBaseTile tcb = (AEBaseTile) tile;

View file

@ -70,7 +70,7 @@ public class NEICraftingHandler implements IOverlayHandler
if ( ctSlot.getSlotIndex() == col + row * 3 )
{
NBTTagList tags = new NBTTagList();
List<ItemStack> list = new LinkedList();
List<ItemStack> list = new LinkedList<ItemStack>();
// prefer pure crystals.
for (int x = 0; x < positionedStack.items.length; x++)

View file

@ -30,8 +30,8 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
{
HashMap<AEItemDefinition, String> details = new HashMap<AEItemDefinition, String>();
List<AEItemDefinition> offsets = new LinkedList();
List<PositionedStack> outputs = new LinkedList();
List<AEItemDefinition> offsets = new LinkedList<AEItemDefinition>();
List<PositionedStack> outputs = new LinkedList<PositionedStack>();
ItemStack target;

View file

@ -49,7 +49,7 @@ import com.google.common.collect.ImmutableSet;
public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, IUpgradeModule
{
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap();
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap<Integer, MaterialType>();
public static ItemMultiMaterial instance;
@ -109,7 +109,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
Upgrades u = getType( is );
if ( u != null )
{
List<String> textList = new LinkedList();
List<String> textList = new LinkedList<String>();
for (Entry<ItemStack, Integer> j : u.getSupported().entrySet())
{
String name = null;

View file

@ -110,7 +110,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
{
if ( subTypes == null )
{
subTypes = new ArrayList();
subTypes = new ArrayList<ItemStack>();
for (Object blk : Block.blockRegistry)
{
Block b = (Block) blk;
@ -118,7 +118,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
{
Item item = Item.getItemFromBlock( b );
List<ItemStack> tmpList = new ArrayList();
List<ItemStack> tmpList = new ArrayList<ItemStack>();
b.getSubBlocks( item, b.getCreativeTabToDisplayOn(), tmpList );
for (ItemStack l : tmpList)
{

View file

@ -43,7 +43,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
IIcon ico;
}
HashMap<Integer, PartTypeIst> dmgToPart = new HashMap();
HashMap<Integer, PartTypeIst> dmgToPart = new HashMap<Integer, PartTypeIst>();
public static ItemMultiPart instance;
@ -209,7 +209,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
@Override
public void getSubItems(Item number, CreativeTabs tab, List cList)
{
List<Entry<Integer, PartTypeIst>> types = new ArrayList( dmgToPart.entrySet() );
List<Entry<Integer, PartTypeIst>> types = new ArrayList<Entry<Integer, PartTypeIst>>( dmgToPart.entrySet() );
Collections.sort( types, new Comparator<Entry<Integer, PartTypeIst>>() {
@Override

View file

@ -58,7 +58,7 @@ import appeng.util.item.AEItemStack;
public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCell, IItemGroup, IBlockTool, IMouseWheelItem
{
final static HashMap<Integer, AEColor> oreToColor = new HashMap();
final static HashMap<Integer, AEColor> oreToColor = new HashMap<Integer, AEColor>();
static
{

View file

@ -146,7 +146,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
coolDown.put( new Combo( Blocks.flowing_lava, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.obsidian ) ) );
coolDown.put( new Combo( Blocks.grass, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.dirt ) ) );
List<ItemStack> snowBalls = new ArrayList();
List<ItemStack> snowBalls = new ArrayList<ItemStack>();
snowBalls.add( new ItemStack( Items.snowball ) );
coolDown.put( new Combo( Blocks.flowing_water, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( null, snowBalls ) );
coolDown.put( new Combo( Blocks.water, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.ice ) ) );

View file

@ -196,12 +196,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@ -215,8 +215,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, false );
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
Vec3 vec = Vec3.createVectorHelper( d0, d1, d2 );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
{
pos = new MovingObjectPosition( entity );
}
@ -228,7 +228,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
try
{
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( Srec ) + 1) ) );
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1) ) );
}
catch (Exception err)
@ -321,12 +321,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@ -338,9 +338,9 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
}
}
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
Vec3 vec = Vec3.createVectorHelper( d0, d1, d2 );
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, true );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
{
pos = new MovingObjectPosition( entity );
}
@ -352,7 +352,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
try
{
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( Srec ) + 1) ) );
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1) ) );
}
catch (Exception err)
@ -480,7 +480,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
}
@Override
public int BytePerType(ItemStack iscellItem)
public int BytePerType(ItemStack cell)
{
return 8;
}

View file

@ -156,7 +156,7 @@ public class GridConnection implements IGridConnection, IPathItem
@Override
public IReadOnlyCollection<IPathItem> getPossibleOptions()
{
return new ReadOnlyCollection( Arrays.asList( new IPathItem[] { (IPathItem) a(), (IPathItem) b() } ) );
return new ReadOnlyCollection<IPathItem>( Arrays.asList( (IPathItem) a(), (IPathItem) b() ) );
}
@Override

View file

@ -39,7 +39,7 @@ public class GridNode implements IGridNode, IPathItem
final static private MENetworkChannelsChanged event = new MENetworkChannelsChanged();
final static private int channelCount[] = new int[] { 0, 8, 32 };
final List<IGridConnection> Connections = new LinkedList();
final List<IGridConnection> Connections = new LinkedList<IGridConnection>();
GridStorage myStorage = null;
IGridBlock gridProxy;
@ -167,14 +167,14 @@ public class GridNode implements IGridNode, IPathItem
{
Object tracker = new Object();
LinkedList<GridNode> nextRun = new LinkedList();
LinkedList<GridNode> nextRun = new LinkedList<GridNode>();
nextRun.add( this );
visitorIterationNumber = tracker;
if ( g instanceof IGridConnectionVisitor )
{
LinkedList<IGridConnection> nextConn = new LinkedList();
LinkedList<IGridConnection> nextConn = new LinkedList<IGridConnection>();
IGridConnectionVisitor gcv = (IGridConnectionVisitor) g;
while (!nextRun.isEmpty())
@ -183,7 +183,7 @@ public class GridNode implements IGridNode, IPathItem
gcv.visitConnection( nextConn.poll() );
LinkedList<GridNode> thisRun = nextRun;
nextRun = new LinkedList();
nextRun = new LinkedList<GridNode>();
for (GridNode n : thisRun)
n.visitorConnection( tracker, g, nextRun, nextConn );
@ -194,7 +194,7 @@ public class GridNode implements IGridNode, IPathItem
while (!nextRun.isEmpty())
{
LinkedList<GridNode> thisRun = nextRun;
nextRun = new LinkedList();
nextRun = new LinkedList<GridNode>();
for (GridNode n : thisRun)
n.visitorNode( tracker, g, nextRun );

View file

@ -22,7 +22,7 @@ public class GridStorage implements IGridStorage
final NBTTagCompound data;
public boolean isDirty = false;
private WeakHashMap<GridStorage,Boolean> divided = new WeakHashMap();
private WeakHashMap<GridStorage,Boolean> divided = new WeakHashMap<GridStorage,Boolean>();
final GridStorageSearch mySearchEntry; // keep myself in the list until I'm
// lost...

View file

@ -57,7 +57,7 @@ public class NetworkEventBus
class MENetworkEventInfo
{
private ArrayList<EventMethod> methods = new ArrayList();
private ArrayList<EventMethod> methods = new ArrayList<EventMethod>();
public void Add(Class Event, Class ObjClass, Method ObjMethod)
{
@ -71,8 +71,8 @@ public class NetworkEventBus
}
}
private static Set<Class> readClasses = new HashSet();
private static Hashtable<Class<? extends MENetworkEvent>, Hashtable<Class, MENetworkEventInfo>> events = new Hashtable();
private static Set<Class> readClasses = new HashSet<Class>();
private static Hashtable<Class<? extends MENetworkEvent>, Hashtable<Class, MENetworkEventInfo>> events = new Hashtable<Class<? extends MENetworkEvent>, Hashtable<Class, MENetworkEventInfo>>();
public void readClass(Class listAs, Class c)
{
@ -95,7 +95,7 @@ public class NetworkEventBus
Hashtable<Class, MENetworkEventInfo> classEvents = events.get( types[0] );
if ( classEvents == null )
events.put( types[0], classEvents = new Hashtable() );
events.put( types[0], classEvents = new Hashtable<Class, MENetworkEventInfo>() );
MENetworkEventInfo thisEvent = classEvents.get( listAs );
if ( thisEvent == null )

View file

@ -8,7 +8,7 @@ import java.util.List;
public class NetworkList implements Collection<Grid>
{
private List<Grid> networks = new LinkedList();
private List<Grid> networks = new LinkedList<Grid>();
@Override
public boolean add(Grid e)

View file

@ -68,8 +68,8 @@ import com.google.common.collect.SetMultimap;
public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler
{
HashSet<CraftingCPUCluster> cpuClusters = new HashSet();
HashSet<ICraftingProvider> providers = new HashSet();
HashSet<CraftingCPUCluster> cpuClusters = new HashSet<CraftingCPUCluster>();
HashSet<ICraftingProvider> providers = new HashSet<ICraftingProvider>();
private HashMap<IGridNode, ICraftingWatcher> watchers = new HashMap<IGridNode, ICraftingWatcher>();
@ -77,14 +77,14 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
IStorageGrid sg;
IEnergyGrid eg;
HashMap<ICraftingPatternDetails, List<ICraftingMedium>> craftingMethods = new HashMap();
HashMap<IAEItemStack, ImmutableList<ICraftingPatternDetails>> craftableItems = new HashMap();
HashSet<IAEItemStack> emitableItems = new HashSet();
HashMap<String, CraftingLinkNexus> links = new HashMap();
HashMap<ICraftingPatternDetails, List<ICraftingMedium>> craftingMethods = new HashMap<ICraftingPatternDetails, List<ICraftingMedium>>();
HashMap<IAEItemStack, ImmutableList<ICraftingPatternDetails>> craftableItems = new HashMap<IAEItemStack, ImmutableList<ICraftingPatternDetails>>();
HashSet<IAEItemStack> emitableItems = new HashSet<IAEItemStack>();
HashMap<String, CraftingLinkNexus> links = new HashMap<String, CraftingLinkNexus>();
boolean updateList = false;
final private SetMultimap<IAEStack, ItemWatcher> interests = HashMultimap.create();
final public GenericInterestManager interestManager = new GenericInterestManager( interests );
final private SetMultimap<IAEStack, CraftingWatcher> interests = HashMultimap.create();
final public GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<CraftingWatcher>( interests );
class ActiveCpuIterator implements Iterator<ICraftingCPU>
{
@ -301,7 +301,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
// erase list.
craftingMethods.clear();
craftableItems = new HashMap();
craftableItems = new HashMap<IAEItemStack, ImmutableList<ICraftingPatternDetails>>();
emitableItems.clear();
// update the stuff that was in the list...
@ -311,7 +311,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
for (ICraftingProvider cp : providers)
cp.provideCrafting( this );
HashMap<IAEItemStack, Set<ICraftingPatternDetails>> tmpCraft = new HashMap();
HashMap<IAEItemStack, Set<ICraftingPatternDetails>> tmpCraft = new HashMap<IAEItemStack, Set<ICraftingPatternDetails>>();
// new craftables!
for (ICraftingPatternDetails details : craftingMethods.keySet())

View file

@ -71,15 +71,15 @@ public class EnergyGridCache implements IEnergyGrid
double extra = 0;
IAEPowerStorage lastProvider;
final Set<IAEPowerStorage> providers = new LinkedHashSet();
final Set<IAEPowerStorage> providers = new LinkedHashSet<IAEPowerStorage>();
IAEPowerStorage lastRequester;
final Set<IAEPowerStorage> requesters = new LinkedHashSet();
final Set<IAEPowerStorage> requesters = new LinkedHashSet<IAEPowerStorage>();
final public TreeSet<EnergyThreshold> interests = new TreeSet<EnergyThreshold>();
final private HashMap<IGridNode, IEnergyWatcher> watchers = new HashMap<IGridNode, IEnergyWatcher>();
final private Set<IEnergyGrid> localSeen = new HashSet();
final private Set<IEnergyGrid> localSeen = new HashSet<IEnergyGrid>();
private double buffer()
{

View file

@ -39,10 +39,10 @@ public class GridStorageCache implements IStorageGrid
{
final private SetMultimap<IAEStack, ItemWatcher> interests = HashMultimap.create();
final public GenericInterestManager interestManager = new GenericInterestManager( interests );
final public GenericInterestManager<ItemWatcher> interestManager = new GenericInterestManager<ItemWatcher>( interests );
final HashSet<ICellProvider> activeCellProviders = new HashSet();
final HashSet<ICellProvider> inactiveCellProviders = new HashSet();
final HashSet<ICellProvider> activeCellProviders = new HashSet<ICellProvider>();
final HashSet<ICellProvider> inactiveCellProviders = new HashSet<ICellProvider>();
final public IGrid myGrid;
private NetworkInventoryHandler<IAEItemStack> myItemNetwork;
@ -95,7 +95,7 @@ public class GridStorageCache implements IStorageGrid
private class CellChangeTracker
{
List<CellChangeTrackerRecord> data = new LinkedList();
List<CellChangeTrackerRecord> data = new LinkedList<CellChangeTrackerRecord>();
public void postChanges(StorageChannel channel, int i, IMEInventoryHandler<? extends IAEStack> h, BaseActionSource actionSrc)
{

View file

@ -22,7 +22,7 @@ import com.google.common.collect.Multimap;
public class P2PCache implements IGridCache
{
final private HashMap<Long, PartP2PTunnel> inputs = new HashMap();
final private HashMap<Long, PartP2PTunnel> inputs = new HashMap<Long, PartP2PTunnel>();
final private Multimap<Long, PartP2PTunnel> outputs = LinkedHashMultimap.create();
final private TunnelCollection NullColl = new TunnelCollection<PartP2PTunnel>( null, null );

View file

@ -43,7 +43,7 @@ public class PathGridCache implements IPathingGrid
boolean updateNetwork = true;
boolean booting = false;
final LinkedList<PathSegment> active = new LinkedList();
final LinkedList<PathSegment> active = new LinkedList<PathSegment>();
ControllerState controllerState = ControllerState.NO_CONTROLLER;
@ -53,13 +53,13 @@ public class PathGridCache implements IPathingGrid
public int channelsInUse = 0;
int lastChannels = 0;
final Set<TileController> controllers = new HashSet();
final Set<IGridNode> requireChannels = new HashSet();
final Set<IGridNode> blockDense = new HashSet();
final Set<TileController> controllers = new HashSet<TileController>();
final Set<IGridNode> requireChannels = new HashSet<IGridNode>();
final Set<IGridNode> blockDense = new HashSet<IGridNode>();
final IGrid myGrid;
private HashSet<IPathItem> semiOpen = new HashSet();
private HashSet<IPathItem> closedList = new HashSet();
private HashSet<IPathItem> semiOpen = new HashSet<IPathItem>();
private HashSet<IPathItem> closedList = new HashSet<IPathItem>();
public int channelsByBlocks = 0;
public double channelPowerUsage = 0.0;

View file

@ -22,7 +22,7 @@ import appeng.me.GridNode;
public class SecurityCache implements IGridCache, ISecurityGrid
{
final private List<ISecurityProvider> securityProvider = new ArrayList();
final private List<ISecurityProvider> securityProvider = new ArrayList<ISecurityProvider>();
final private HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms = new HashMap<Integer, EnumSet<SecurityPermissions>>();
public SecurityCache(IGrid g) {

View file

@ -29,8 +29,8 @@ public class SpatialPylonCache implements IGridCache, ISpatialCache
DimensionalCoord captureMax;
boolean isValid = false;
List<TileSpatialIOPort> ioPorts = new LinkedList();
HashMap<SpatialPylonCluster, SpatialPylonCluster> clusters = new HashMap();
List<TileSpatialIOPort> ioPorts = new LinkedList<TileSpatialIOPort>();
HashMap<SpatialPylonCluster, SpatialPylonCluster> clusters = new HashMap<SpatialPylonCluster, SpatialPylonCluster>();
boolean needsUpdate = false;
@ -80,8 +80,8 @@ public class SpatialPylonCache implements IGridCache, ISpatialCache
double minPower = 0;
double maxPower = 0;
clusters = new HashMap();
ioPorts = new LinkedList();
clusters = new HashMap<SpatialPylonCluster, SpatialPylonCluster>();
ioPorts = new LinkedList<TileSpatialIOPort>();
for (IGridNode gm : grid.getMachines( TileSpatialIOPort.class ))
{

View file

@ -10,7 +10,7 @@ public class Connections implements Callable
{
final private PartP2PTunnelME me;
final public HashMap<IGridNode, TunnelConnection> connections = new HashMap();
final public HashMap<IGridNode, TunnelConnection> connections = new HashMap<IGridNode, TunnelConnection>();
public boolean create = false;
public boolean destroy = false;

View file

@ -21,8 +21,8 @@ public class TunnelCollection<T extends PartP2PTunnel> implements Iterable<T>
public Iterator<T> iterator()
{
if ( tunnelSources == null )
return new NullIterator();
return new TunnelIterator( tunnelSources, clz );
return new NullIterator<T>();
return new TunnelIterator<T>( tunnelSources, clz );
}
public void setSource(Collection<T> c)

View file

@ -1,11 +1,7 @@
package appeng.me.cluster.implementations;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.*;
import java.util.Map.Entry;
import java.util.Set;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
@ -83,7 +79,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
IItemList<IAEItemStack> waitingFor = AEApi.instance().storage().createItemList();
// instance sate
final private LinkedList<TileCraftingTile> tiles = new LinkedList();
final private LinkedList<TileCraftingTile> tiles = new LinkedList<TileCraftingTile>();
final private LinkedList<TileCraftingTile> storage = new LinkedList<TileCraftingTile>();
final private LinkedList<TileCraftingMonitorTile> status = new LinkedList<TileCraftingMonitorTile>();
@ -290,9 +286,11 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( sg.interestManager.containsKey( diff ) )
{
Set<CraftingWatcher> list = sg.interestManager.get( diff );
if ( !list.isEmpty() )
{
for (CraftingWatcher iw : list)
iw.getHost().onRequestChange( sg, diff );
}
}

View file

@ -23,7 +23,7 @@ public class SpatialPylonCluster implements IAECluster
public Axis currentAxis = Axis.UNFORMED;
final List<TileSpatialPylon> line = new ArrayList();
final List<TileSpatialPylon> line = new ArrayList<TileSpatialPylon>();
public boolean isValid;
public boolean hasPower;
public boolean hasChannel;

View file

@ -50,7 +50,7 @@ public class EnergyWatcher implements IEnergyWatcher
EnergyGridCache gsc;
IEnergyWatcherHost myObject;
HashSet<EnergyThreshold> myInterests = new HashSet();
HashSet<EnergyThreshold> myInterests = new HashSet<EnergyThreshold>();
public void post(EnergyGridCache energyGridCache)
{

View file

@ -35,7 +35,7 @@ public class GenericInterestManager<T>
public void enableTransactions()
{
if ( transDepth == 0 )
transactions = new LinkedList();
transactions = new LinkedList<SavedTransactions>();
transDepth++;
}

View file

@ -25,7 +25,7 @@ public class PathSegment
PathGridCache pgc;
public PathSegment(PathGridCache myPGC, List open, Set semiOpen, Set closed)
public PathSegment(PathGridCache myPGC, List<IPathItem> open, Set<IPathItem> semiOpen, Set<IPathItem> closed)
{
this.open = open;
this.semiOpen = semiOpen;
@ -41,7 +41,7 @@ public class PathSegment
public boolean step()
{
List<IPathItem> oldOpen = open;
open = new LinkedList();
open = new LinkedList<IPathItem>();
for (IPathItem i : oldOpen)
{

View file

@ -335,7 +335,7 @@ public class CellInventory implements ICellInventory
return 8 - div;
}
private static HashSet<Integer> blackList = new HashSet();
private static HashSet<Integer> blackList = new HashSet<Integer>();
public static void addBasicBlackList(int itemID, int Meta)
{

View file

@ -50,7 +50,7 @@ public class ItemWatcher implements IStackWatcher
GridStorageCache gsc;
IStackWatcherHost myObject;
HashSet<IAEStack> myInterests = new HashSet();
HashSet<IAEStack> myInterests = new HashSet<IAEStack>();
public ItemWatcher(GridStorageCache cache, IStackWatcherHost host) {
gsc = cache;

View file

@ -184,7 +184,7 @@ public class MEIInventoryWrapper implements IMEInventory<IAEItemStack>
}
@Override
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out)
{
for (int x = 0; x < target.getSizeInventory(); x++)
{

View file

@ -52,7 +52,7 @@ public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonit
final TreeMap<Integer, CachedItemStack> memory;
final IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap();
final HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<IAEItemStack>, Object>();
public BaseActionSource mySource;
public StorageFilter mode = StorageFilter.EXTRACTABLE_ONLY;
@ -72,7 +72,7 @@ public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonit
public MEMonitorIInventory(InventoryAdaptor adaptor)
{
this.adaptor = adaptor;
memory = new TreeMap();
memory = new TreeMap<Integer, CachedItemStack>();
}
@Override

View file

@ -18,7 +18,7 @@ import appeng.util.inv.ItemListIgnoreCrafting;
public class MEMonitorPassThrough<T extends IAEStack<T>> extends MEPassThrough<T> implements IMEMonitor<T>, IMEMonitorHandlerReceiver<T>
{
HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap();
HashMap<IMEMonitorHandlerReceiver<T>, Object> listeners = new HashMap<IMEMonitorHandlerReceiver<T>, Object>();
IMEMonitor<T> monitor;
public BaseActionSource changeSource;

View file

@ -26,7 +26,7 @@ import appeng.util.ItemSorters;
public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHandler<T>
{
private final static Comparator prioritySorter = new Comparator<Integer>() {
private final static Comparator<Integer> prioritySorter = new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2)
@ -45,7 +45,7 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
public NetworkInventoryHandler(StorageChannel chan, SecurityCache security) {
myChannel = chan;
this.security = security;
priorityInventory = new TreeMap( prioritySorter ); // TreeMultimap.create( prioritySorter, hashSorter );
priorityInventory = new TreeMap<Integer, List<IMEInventoryHandler<T>>>( prioritySorter ); // TreeMultimap.create( prioritySorter, hashSorter );
}
public void addNewStorage(IMEInventoryHandler<T> h)
@ -53,7 +53,7 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
int priority = h.getPriority();
List<IMEInventoryHandler<T>> list = priorityInventory.get( priority );
if ( list == null )
priorityInventory.put( priority, list = new ArrayList() );
priorityInventory.put( priority, list = new ArrayList<IMEInventoryHandler<T>>() );
list.add( h );
}

View file

@ -453,7 +453,7 @@ public class AEBasePart implements IPart, IGridProxyable, IActionHost, IUpgradea
{
if ( is.stackSize > 0 )
{
List<ItemStack> items = new ArrayList();
List<ItemStack> items = new ArrayList<ItemStack>();
items.add( is.copy() );
host.removePart( side, false );
Platform.spawnDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, items );

View file

@ -321,7 +321,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
return null;
}
private static final ThreadLocal<Boolean> isLoading = new ThreadLocal();
private static final ThreadLocal<Boolean> isLoading = new ThreadLocal<Boolean>();
public static boolean isLoading()
{
@ -907,7 +907,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
{
if ( getCenter() == null )
{
List<ItemStack> facades = new LinkedList();
List<ItemStack> facades = new LinkedList<ItemStack>();
IFacadeContainer fc = getFacadeContainer();
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)

View file

@ -142,7 +142,7 @@ public class PartPlacement
MovingObjectPosition mop = block.collisionRayTrace( world, x, y, z, dir.a, dir.b );
if ( mop != null )
{
List<ItemStack> is = new LinkedList();
List<ItemStack> is = new LinkedList<ItemStack>();
SelectedPart sp = selectPart( player, host, mop.hitVec.addVector( -mop.blockX, -mop.blockY, -mop.blockZ ) );
if ( sp.part != null )

View file

@ -170,7 +170,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
}
boolean breaking = false;
LinkedList<IAEItemStack> Buffer = new LinkedList();
LinkedList<IAEItemStack> Buffer = new LinkedList<IAEItemStack>();
BaseActionSource mySrc = new MachineSource( this );
@Override

View file

@ -247,11 +247,11 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
{
if ( proxy.isActive() && channel == StorageChannel.ITEMS )
{
List<IMEInventoryHandler> Handler = new ArrayList( 1 );
List<IMEInventoryHandler> Handler = new ArrayList<IMEInventoryHandler>( 1 );
Handler.add( myHandler );
return Handler;
}
return new ArrayList();
return new ArrayList<IMEInventoryHandler>();
}
@Override

View file

@ -42,7 +42,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
List<ISidedInventory> inventories = null;
List<InvSot> slots = null;
inventories = new ArrayList();
inventories = new ArrayList<ISidedInventory>();
int slotCount = 0;
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)

View file

@ -236,7 +236,7 @@ public class PartToggleBus extends PartBasicState
{
if ( is.stackSize > 0 )
{
List<ItemStack> items = new ArrayList();
List<ItemStack> items = new ArrayList<ItemStack>();
items.add( is.copy() );
host.removePart( side, false );
Platform.spawnDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, items );

View file

@ -144,7 +144,7 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
if ( outs.isEmpty() )
return amount;
LinkedList<PartP2PIC2Power> Options = new LinkedList();
LinkedList<PartP2PIC2Power> Options = new LinkedList<PartP2PIC2Power>();
for (PartP2PIC2Power o : outs)
{
if ( o.OutputEnergyA <= 0.01 )

View file

@ -64,7 +64,7 @@ public class GroupIngredient implements IIngredient
if ( isInside )
return new ItemStack[0];
List<ItemStack> out = new LinkedList();
List<ItemStack> out = new LinkedList<ItemStack>();
isInside = true;
try
{

View file

@ -51,7 +51,7 @@ public class IngredientSet implements IIngredient
if ( isInside )
return new ItemStack[0];
List<ItemStack> out = new LinkedList();
List<ItemStack> out = new LinkedList<ItemStack>();
out.addAll( items );
if ( out.size() == 0 )

View file

@ -20,6 +20,6 @@ public class RecipeData
public boolean exceptions = true;
public boolean erroronmissing = true;
public Set<String> knownItem = new HashSet();
public Set<String> knownItem = new HashSet<String>();
}

View file

@ -35,13 +35,13 @@ public class Inscribe implements ICraftHandler, IWebsiteSerializer
final public ItemStack plateB;
final public ItemStack output;
};
}
public boolean usePlates = false;
public static HashSet<ItemStack> plates = new HashSet();
public static HashSet<ItemStack> inputs = new HashSet();
public static LinkedList<InscriberRecipe> recipes = new LinkedList();
public static HashSet<ItemStack> plates = new HashSet<ItemStack>();
public static HashSet<ItemStack> inputs = new HashSet<ItemStack>();
public static LinkedList<InscriberRecipe> recipes = new LinkedList<InscriberRecipe>();
IIngredient imprintable;

View file

@ -42,7 +42,7 @@ public class ServerHelper extends CommonHelper
return server.getConfigurationManager().playerEntityList;
}
return new ArrayList();
return new ArrayList<EntityPlayer>();
}
@Override

View file

@ -234,7 +234,7 @@ public class CompassService implements ThreadFactory
return executor.submit( new CMUpdatePost( w, cx, cz, cdy, false ) );
}
HashMap<World, CompassReader> worldSet = new HashMap();
HashMap<World, CompassReader> worldSet = new HashMap<World, CompassReader>();
ExecutorService executor;
final File rootFolder;

View file

@ -8,7 +8,7 @@ import net.minecraft.world.World;
public class CompassReader
{
HashMap<Long, CompassRegion> regions = new HashMap();
HashMap<Long, CompassRegion> regions = new HashMap<Long, CompassRegion>();
final int id;
final File rootFolder;

View file

@ -159,7 +159,7 @@ public class CachedPlane
for (int cx = 0; cx < cx_size; cx++)
for (int cz = 0; cz < cz_size; cz++)
{
LinkedList<Entry<ChunkPosition, TileEntity>> rwarTiles = new LinkedList();
LinkedList<Entry<ChunkPosition, TileEntity>> rwarTiles = new LinkedList<Entry<ChunkPosition, TileEntity>>();
LinkedList<ChunkPosition> deadTiles = new LinkedList<ChunkPosition>();
Chunk c = w.getChunkFromChunkCoords( minCX + cx, minCZ + cz );

View file

@ -40,12 +40,12 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
{
static private final HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>> handlers = new HashMap<Class, EnumMap<TileEventType, List<AETileEventHandler>>>();
static private final HashMap<Class, ItemStackSrc> myItem = new HashMap();
static private final HashMap<Class, ItemStackSrc> myItem = new HashMap<Class, ItemStackSrc>();
private ForgeDirection forward = ForgeDirection.UNKNOWN;
private ForgeDirection up = ForgeDirection.UNKNOWN;
public static ThreadLocal<WeakReference<AEBaseTile>> dropNoItems = new ThreadLocal();
public static ThreadLocal<WeakReference<AEBaseTile>> dropNoItems = new ThreadLocal<WeakReference<AEBaseTile>>();
public void disableDrops()
{
@ -122,7 +122,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
List<AETileEventHandler> list = handlerSet.get( value );
if ( list == null )
handlerSet.put( value, list = new ArrayList() );
handlerSet.put( value, list = new ArrayList<AETileEventHandler>() );
list.add( new AETileEventHandler( m, value ) );
}

View file

@ -45,7 +45,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
wc.add( getForward(), 1 );
List<ItemStack> out = new ArrayList();
List<ItemStack> out = new ArrayList<ItemStack>();
out.add( notAdded );
Platform.spawnDrops( worldObj, wc.x, wc.y, wc.z, out );

View file

@ -229,7 +229,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable
}
else
{
List<ItemStack> drops = new ArrayList();
List<ItemStack> drops = new ArrayList<ItemStack>();
drops.add( myItem );
setInventorySlotContents( 0, null );
Platform.spawnDrops( worldObj, xCoord + getForward().offsetX, yCoord + getForward().offsetY, zCoord + getForward().offsetZ, drops );

View file

@ -182,7 +182,7 @@ public class TilePaint extends AEBaseTile
boolean lit = ipb.isLumen( type );
if ( dots == null )
dots = new ArrayList();
dots = new ArrayList<Splotch>();
if ( dots.size() > 20 )
dots.remove( 0 );

View file

@ -48,8 +48,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
boolean isCached = false;
ICellHandler handlersBySlot[] = new ICellHandler[10];
DriveWatcher<IAEItemStack> invBySlot[] = new DriveWatcher[10];
List<MEInventoryHandler> items = new LinkedList();
List<MEInventoryHandler> fluids = new LinkedList();
List<MEInventoryHandler> items = new LinkedList<MEInventoryHandler>();
List<MEInventoryHandler> fluids = new LinkedList<MEInventoryHandler>();
BaseActionSource mySrc;
long lastStateChange = 0;

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) {

Some files were not shown because too many files have changed in this diff Show more