Finally use Java7 <>

This commit is contained in:
yueh
2017-07-20 21:21:45 +02:00
parent 8ec8babb6a
commit 7de90ed0ae
145 changed files with 315 additions and 315 deletions
+6 -6
View File
@@ -65,8 +65,8 @@ import appeng.util.SettingsFrom;
public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, ICustomNameObject
{
private static final ThreadLocal<WeakReference<AEBaseTile>> DROP_NO_ITEMS = new ThreadLocal<WeakReference<AEBaseTile>>();
private static final Map<Class<? extends AEBaseTile>, Map<TileEventType, List<AETileEventHandler>>> HANDLERS = new HashMap<Class<? extends AEBaseTile>, Map<TileEventType, List<AETileEventHandler>>>();
private static final ThreadLocal<WeakReference<AEBaseTile>> DROP_NO_ITEMS = new ThreadLocal<>();
private static final Map<Class<? extends AEBaseTile>, Map<TileEventType, List<AETileEventHandler>>> HANDLERS = new HashMap<>();
private static final Map<Class<? extends TileEntity>, IStackSrc> ITEM_STACKS = new HashMap<>();
private int renderFragment = 0;
@Nullable
@@ -394,7 +394,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if( storedHandlers == null )
{
final Map<TileEventType, List<AETileEventHandler>> newStoredHandlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
final Map<TileEventType, List<AETileEventHandler>> newStoredHandlers = new EnumMap<>( TileEventType.class );
HANDLERS.put( clazz, newStoredHandlers );
@@ -422,7 +422,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if( oldHandlers == null )
{
final List<AETileEventHandler> newHandlers = new LinkedList<AETileEventHandler>();
final List<AETileEventHandler> newHandlers = new LinkedList<>();
eventToHandlers.put( event, newHandlers );
return newHandlers;
@@ -439,7 +439,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
if( list == null )
{
list = new ArrayList<AETileEventHandler>();
list = new ArrayList<>();
handlerSet.put( value, list );
}
@@ -624,7 +624,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
public void disableDrops()
{
DROP_NO_ITEMS.set( new WeakReference<AEBaseTile>( this ) );
DROP_NO_ITEMS.set( new WeakReference<>( this ) );
}
public void saveChanges()
@@ -280,7 +280,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
this.cluster.cancel();
final IMEInventory<IAEItemStack> inv = this.cluster.getInventory();
final LinkedList<WorldCoord> places = new LinkedList<WorldCoord>();
final LinkedList<WorldCoord> places = new LinkedList<>();
final Iterator<IGridHost> i = this.cluster.getTiles();
while( i.hasNext() )
@@ -191,7 +191,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
final ItemStack notAdded = sia.addItems( output );
if( !notAdded.isEmpty() )
{
final List<ItemStack> out = new ArrayList<ItemStack>();
final List<ItemStack> out = new ArrayList<>();
out.add( notAdded );
Platform.spawnDrops( this.world, this.pos.offset( this.getForward() ), out );
@@ -229,7 +229,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
}
else
{
final List<ItemStack> drops = new ArrayList<ItemStack>();
final List<ItemStack> drops = new ArrayList<>();
drops.add( myItem );
this.setInventorySlotContents( 0, ItemStack.EMPTY );
Platform.spawnDrops( this.world, this.pos.offset( this.getForward() ), drops );
@@ -245,7 +245,7 @@ public class TilePaint extends AEBaseTile
if( this.dots == null )
{
this.dots = new ArrayList<Splotch>();
this.dots = new ArrayList<>();
}
if( this.dots.size() > 20 )
@@ -87,7 +87,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
private final AppEngInternalInventory configSlot = new AppEngInternalInventory( this, 1 );
private final IConfigManager cm = new ConfigManager( this );
private final SecurityStationInventory inventory = new SecurityStationInventory( this );
private final MEMonitorHandler<IAEItemStack> securityMonitor = new MEMonitorHandler<IAEItemStack>( this.inventory );
private final MEMonitorHandler<IAEItemStack> securityMonitor = new MEMonitorHandler<>( this.inventory );
private long securityKey;
private AEColor paintedColor = AEColor.TRANSPARENT;
private boolean isActive = false;
@@ -675,7 +675,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
// :P
}
}
return new ArrayList<IMEInventoryHandler>();
return new ArrayList<>();
}
@Override
@@ -73,8 +73,8 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
private final DriveWatcher<IAEItemStack>[] invBySlot = new DriveWatcher[10];
private final BaseActionSource mySrc;
private boolean isCached = false;
private List<MEInventoryHandler> items = new LinkedList<MEInventoryHandler>();
private List<MEInventoryHandler> fluids = new LinkedList<MEInventoryHandler>();
private List<MEInventoryHandler> items = new LinkedList<>();
private List<MEInventoryHandler> fluids = new LinkedList<>();
private int priority = 0;
private boolean wasActive = false;