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
@@ -116,7 +116,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
public static final int NUMBER_OF_PATTERN_SLOTS = 9;
private static final Collection<Block> BAD_BLOCKS = new HashSet<Block>( 100 );
private static final Collection<Block> BAD_BLOCKS = new HashSet<>( 100 );
private final int[] sides = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
private final IAEItemStack[] requireWork = { null, null, null, null, null, null, null, null, null };
private final MultiCraftingTracker craftingTracker;
@@ -129,8 +129,8 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
private final AppEngInternalInventory storage = new AppEngInternalInventory( this, NUMBER_OF_STORAGE_SLOTS );
private final AppEngInternalInventory patterns = new AppEngInternalInventory( this, NUMBER_OF_PATTERN_SLOTS );
private final WrapperInvSlot slotInv = new WrapperInvSlot( this.storage );
private final MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<IAEItemStack>( new NullInventory<IAEItemStack>(), StorageChannel.ITEMS );
private final MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<IAEFluidStack>( new NullInventory<IAEFluidStack>(), StorageChannel.FLUIDS );
private final MEMonitorPassThrough<IAEItemStack> items = new MEMonitorPassThrough<>( new NullInventory<IAEItemStack>(), StorageChannel.ITEMS );
private final MEMonitorPassThrough<IAEFluidStack> fluids = new MEMonitorPassThrough<>( new NullInventory<IAEFluidStack>(), StorageChannel.FLUIDS );
private final UpgradeInventory upgrades;
private boolean hasConfig = false;
private int priority;
@@ -272,7 +272,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
if( this.waitingToSend == null )
{
this.waitingToSend = new LinkedList<ItemStack>();
this.waitingToSend = new LinkedList<>();
}
this.waitingToSend.add( is );
@@ -489,7 +489,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
{
if( this.craftingList == null )
{
this.craftingList = new LinkedList<ICraftingPatternDetails>();
this.craftingList = new LinkedList<>();
}
this.craftingList.add( details );
@@ -146,7 +146,7 @@ public class MultiCraftingTracker
return ImmutableSet.of();
}
return ImmutableSet.copyOf( new NonNullArrayIterator<ICraftingLink>( this.links ) );
return ImmutableSet.copyOf( new NonNullArrayIterator<>( this.links ) );
}
public void jobStateChange( final ICraftingLink link )
@@ -58,8 +58,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
private final IAEItemStack[] outputs;
private final boolean isCrafting;
private final boolean canSubstitute;
private final Set<TestLookup> failCache = new HashSet<TestLookup>();
private final Set<TestLookup> passCache = new HashSet<TestLookup>();
private final Set<TestLookup> failCache = new HashSet<>();
private final Set<TestLookup> passCache = new HashSet<>();
private final IAEItemStack pattern;
private int priority = 0;
@@ -80,8 +80,8 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
this.patternItem = is;
this.pattern = AEItemStack.create( is );
final List<IAEItemStack> in = new ArrayList<IAEItemStack>();
final List<IAEItemStack> out = new ArrayList<IAEItemStack>();
final List<IAEItemStack> in = new ArrayList<>();
final List<IAEItemStack> out = new ArrayList<>();
for( int x = 0; x < inTag.tagCount(); x++ )
{
@@ -131,7 +131,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
this.outputs = out.toArray( new IAEItemStack[out.size()] );
this.inputs = in.toArray( new IAEItemStack[in.size()] );
final Map<IAEItemStack, IAEItemStack> tmpOutputs = new HashMap<IAEItemStack, IAEItemStack>();
final Map<IAEItemStack, IAEItemStack> tmpOutputs = new HashMap<>();
for( final IAEItemStack io : this.outputs )
{
@@ -152,7 +152,7 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
}
}
final Map<IAEItemStack, IAEItemStack> tmpInputs = new HashMap<IAEItemStack, IAEItemStack>();
final Map<IAEItemStack, IAEItemStack> tmpInputs = new HashMap<>();
for( final IAEItemStack io : this.inputs )
{