Finally use Java7 <>
This commit is contained in:
@@ -87,12 +87,12 @@ public abstract class AEBaseContainer extends Container
|
||||
|
||||
private final InventoryPlayer invPlayer;
|
||||
private final BaseActionSource mySrc;
|
||||
private final HashSet<Integer> locked = new HashSet<Integer>();
|
||||
private final HashSet<Integer> locked = new HashSet<>();
|
||||
private final TileEntity tileEntity;
|
||||
private final IPart part;
|
||||
private final IGuiItemObject obj;
|
||||
private final List<PacketPartialItem> dataChunks = new LinkedList<PacketPartialItem>();
|
||||
private final HashMap<Integer, SyncData> syncData = new HashMap<Integer, SyncData>();
|
||||
private final List<PacketPartialItem> dataChunks = new LinkedList<>();
|
||||
private final HashMap<Integer, SyncData> syncData = new HashMap<>();
|
||||
private boolean isContainerValid = true;
|
||||
private String customName;
|
||||
private ContainerOpenContext openContext;
|
||||
@@ -245,7 +245,7 @@ public abstract class AEBaseContainer extends Container
|
||||
CompressedStreamTools.writeCompressed( item, stream );
|
||||
|
||||
final int maxChunkSize = 30000;
|
||||
final List<byte[]> miniPackets = new LinkedList<byte[]>();
|
||||
final List<byte[]> miniPackets = new LinkedList<>();
|
||||
|
||||
final byte[] data = stream.toByteArray();
|
||||
|
||||
@@ -488,7 +488,7 @@ public abstract class AEBaseContainer extends Container
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
final List<Slot> selectedSlots = new ArrayList<Slot>();
|
||||
final List<Slot> selectedSlots = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Gather a list of valid destinations.
|
||||
@@ -825,7 +825,7 @@ public abstract class AEBaseContainer extends Container
|
||||
|
||||
if( action == InventoryAction.MOVE_REGION )
|
||||
{
|
||||
final List<Slot> from = new LinkedList<Slot>();
|
||||
final List<Slot> from = new LinkedList<>();
|
||||
|
||||
for( final Object j : this.inventorySlots )
|
||||
{
|
||||
|
||||
@@ -234,7 +234,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
final IMEInventory<IAEItemStack> cellInv = AEApi.instance().registries().cell().getCellInventory(
|
||||
this.getUpgradeable().getInventoryByName( "cell" ).getStackInSlot( 0 ), null, StorageChannel.ITEMS );
|
||||
|
||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||
Iterator<IAEItemStack> i = new NullIterator<>();
|
||||
if( cellInv != null )
|
||||
{
|
||||
final IItemList<IAEItemStack> list = cellInv.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
|
||||
@@ -69,7 +69,7 @@ import appeng.util.Platform;
|
||||
public class ContainerCraftConfirm extends AEBaseContainer
|
||||
{
|
||||
|
||||
private final ArrayList<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
|
||||
private final ArrayList<CraftingCPURecord> cpus = new ArrayList<>();
|
||||
private Future<ICraftingJob> job;
|
||||
private ICraftingJob result;
|
||||
@GuiSync( 0 )
|
||||
|
||||
@@ -37,7 +37,7 @@ import appeng.util.Platform;
|
||||
public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
{
|
||||
|
||||
private final List<CraftingCPURecord> cpus = new ArrayList<CraftingCPURecord>();
|
||||
private final List<CraftingCPURecord> cpus = new ArrayList<>();
|
||||
@GuiSync( 5 )
|
||||
public int selectedCpu = -1;
|
||||
@GuiSync( 6 )
|
||||
|
||||
@@ -62,8 +62,8 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
*/
|
||||
|
||||
private static long autoBase = Long.MIN_VALUE;
|
||||
private final Map<IInterfaceHost, InvTracker> diList = new HashMap<IInterfaceHost, InvTracker>();
|
||||
private final Map<Long, InvTracker> byId = new HashMap<Long, InvTracker>();
|
||||
private final Map<IInterfaceHost, InvTracker> diList = new HashMap<>();
|
||||
private final Map<Long, InvTracker> byId = new HashMap<>();
|
||||
private IGrid grid;
|
||||
private NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
else
|
||||
{
|
||||
final List<ItemStack> list = new ArrayList<ItemStack>( 3 );
|
||||
final List<ItemStack> list = new ArrayList<>( 3 );
|
||||
boolean hasValue = false;
|
||||
|
||||
for( final OptionalSlotFake outputSlot : this.outputSlots )
|
||||
|
||||
@@ -157,7 +157,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
|
||||
final IMEInventory<IAEItemStack> cellInv = this.storageBus.getInternalHandler();
|
||||
|
||||
Iterator<IAEItemStack> i = new NullIterator<IAEItemStack>();
|
||||
Iterator<IAEItemStack> i = new NullIterator<>();
|
||||
if( cellInv != null )
|
||||
{
|
||||
final IItemList<IAEItemStack> list = cellInv.getAvailableItems( AEApi.instance().storage().createItemList() );
|
||||
|
||||
@@ -141,7 +141,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
final ItemStack extra = ia.addItems( this.craftItem( who, rs, inv, all ) );
|
||||
if( !extra.isEmpty() )
|
||||
{
|
||||
final List<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> drops = new ArrayList<>();
|
||||
drops.add( extra );
|
||||
Platform.spawnDrops( who.world, new BlockPos( (int) who.posX, (int) who.posY, (int) who.posZ ), drops );
|
||||
return;
|
||||
@@ -250,7 +250,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
|
||||
private void postCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
{
|
||||
final List<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> drops = new ArrayList<>();
|
||||
|
||||
// add one of each item to the items on the board...
|
||||
if( Platform.isServer() )
|
||||
|
||||
Reference in New Issue
Block a user