Finally use Java7 <>
This commit is contained in:
+13
-13
@@ -114,16 +114,16 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
CRAFTING_POOL = Executors.newCachedThreadPool( factory );
|
||||
}
|
||||
|
||||
private final Set<CraftingCPUCluster> craftingCPUClusters = new HashSet<CraftingCPUCluster>();
|
||||
private final Set<ICraftingProvider> craftingProviders = new HashSet<ICraftingProvider>();
|
||||
private final Map<IGridNode, ICraftingWatcher> craftingWatchers = new HashMap<IGridNode, ICraftingWatcher>();
|
||||
private final Set<CraftingCPUCluster> craftingCPUClusters = new HashSet<>();
|
||||
private final Set<ICraftingProvider> craftingProviders = new HashSet<>();
|
||||
private final Map<IGridNode, ICraftingWatcher> craftingWatchers = new HashMap<>();
|
||||
private final IGrid grid;
|
||||
private final Map<ICraftingPatternDetails, List<ICraftingMedium>> craftingMethods = new HashMap<ICraftingPatternDetails, List<ICraftingMedium>>();
|
||||
private final Map<IAEItemStack, ImmutableList<ICraftingPatternDetails>> craftableItems = new HashMap<IAEItemStack, ImmutableList<ICraftingPatternDetails>>();
|
||||
private final Set<IAEItemStack> emitableItems = new HashSet<IAEItemStack>();
|
||||
private final Map<String, CraftingLinkNexus> craftingLinks = new HashMap<String, CraftingLinkNexus>();
|
||||
private final Map<ICraftingPatternDetails, List<ICraftingMedium>> craftingMethods = new HashMap<>();
|
||||
private final Map<IAEItemStack, ImmutableList<ICraftingPatternDetails>> craftableItems = new HashMap<>();
|
||||
private final Set<IAEItemStack> emitableItems = new HashSet<>();
|
||||
private final Map<String, CraftingLinkNexus> craftingLinks = new HashMap<>();
|
||||
private final Multimap<IAEStack, CraftingWatcher> interests = HashMultimap.create();
|
||||
private final GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<CraftingWatcher>( this.interests );
|
||||
private final GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<>( this.interests );
|
||||
private IStorageGrid storageGrid;
|
||||
private IEnergyGrid energyGrid;
|
||||
private boolean updateList = false;
|
||||
@@ -271,7 +271,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
provider.provideCrafting( this );
|
||||
}
|
||||
|
||||
final Map<IAEItemStack, Set<ICraftingPatternDetails>> tmpCraft = new HashMap<IAEItemStack, Set<ICraftingPatternDetails>>();
|
||||
final Map<IAEItemStack, Set<ICraftingPatternDetails>> tmpCraft = new HashMap<>();
|
||||
|
||||
// new craftables!
|
||||
for( final ICraftingPatternDetails details : this.craftingMethods.keySet() )
|
||||
@@ -286,7 +286,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
|
||||
if( methods == null )
|
||||
{
|
||||
tmpCraft.put( out, methods = new TreeSet<ICraftingPatternDetails>( COMPARATOR ) );
|
||||
tmpCraft.put( out, methods = new TreeSet<>( COMPARATOR ) );
|
||||
}
|
||||
|
||||
methods.add( details );
|
||||
@@ -357,7 +357,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
List<ICraftingMedium> details = this.craftingMethods.get( api );
|
||||
if( details == null )
|
||||
{
|
||||
details = new ArrayList<ICraftingMedium>();
|
||||
details = new ArrayList<>();
|
||||
details.add( medium );
|
||||
this.craftingMethods.put( api, details );
|
||||
}
|
||||
@@ -376,7 +376,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
@Override
|
||||
public List<IMEInventoryHandler> getCellArray( final StorageChannel channel )
|
||||
{
|
||||
final List<IMEInventoryHandler> list = new ArrayList<IMEInventoryHandler>( 1 );
|
||||
final List<IMEInventoryHandler> list = new ArrayList<>( 1 );
|
||||
|
||||
if( channel == StorageChannel.ITEMS )
|
||||
{
|
||||
@@ -527,7 +527,7 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
||||
|
||||
if( target == null )
|
||||
{
|
||||
final List<CraftingCPUCluster> validCpusClusters = new ArrayList<CraftingCPUCluster>();
|
||||
final List<CraftingCPUCluster> validCpusClusters = new ArrayList<>();
|
||||
for( final CraftingCPUCluster cpu : this.craftingCPUClusters )
|
||||
{
|
||||
if( cpu.isActive() && !cpu.isBusy() && cpu.getAvailableStorage() >= job.getByteTotal() )
|
||||
|
||||
Reference in New Issue
Block a user