Finally use Java7 <>
This commit is contained in:
@@ -32,7 +32,7 @@ import appeng.core.AELog;
|
||||
|
||||
public final class GridCacheRegistry implements IGridCacheRegistry
|
||||
{
|
||||
private final Map<Class<? extends IGridCache>, Class<? extends IGridCache>> caches = new HashMap<Class<? extends IGridCache>, Class<? extends IGridCache>>();
|
||||
private final Map<Class<? extends IGridCache>, Class<? extends IGridCache>> caches = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void registerGridCache( final Class<? extends IGridCache> iface, final Class<? extends IGridCache> implementation )
|
||||
@@ -50,7 +50,7 @@ public final class GridCacheRegistry implements IGridCacheRegistry
|
||||
@Override
|
||||
public HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance( final IGrid g )
|
||||
{
|
||||
final HashMap<Class<? extends IGridCache>, IGridCache> map = new HashMap<Class<? extends IGridCache>, IGridCache>();
|
||||
final HashMap<Class<? extends IGridCache>, IGridCache> map = new HashMap<>();
|
||||
|
||||
for( final Class<? extends IGridCache> iface : this.caches.keySet() )
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ public final class LocatableRegistry implements ILocatableRegistry
|
||||
|
||||
public LocatableRegistry()
|
||||
{
|
||||
this.set = new HashMap<Long, ILocatable>();
|
||||
this.set = new HashMap<>();
|
||||
MinecraftForge.EVENT_BUS.register( this );
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import appeng.util.Platform;
|
||||
public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmoRegistry
|
||||
{
|
||||
|
||||
private final HashMap<ItemStack, Double> DamageModifiers = new HashMap<ItemStack, Double>();
|
||||
private final HashMap<ItemStack, Double> DamageModifiers = new HashMap<>();
|
||||
|
||||
public MatterCannonAmmoRegistry()
|
||||
{
|
||||
|
||||
@@ -36,11 +36,11 @@ import appeng.spatial.DefaultSpatialHandler;
|
||||
public class MovableTileRegistry implements IMovableRegistry
|
||||
{
|
||||
|
||||
private final HashSet<Block> blacklisted = new HashSet<Block>();
|
||||
private final HashSet<Block> blacklisted = new HashSet<>();
|
||||
|
||||
private final HashMap<Class<? extends TileEntity>, IMovableHandler> Valid = new HashMap<Class<? extends TileEntity>, IMovableHandler>();
|
||||
private final LinkedList<Class<? extends TileEntity>> test = new LinkedList<Class<? extends TileEntity>>();
|
||||
private final LinkedList<IMovableHandler> handlers = new LinkedList<IMovableHandler>();
|
||||
private final HashMap<Class<? extends TileEntity>, IMovableHandler> Valid = new HashMap<>();
|
||||
private final LinkedList<Class<? extends TileEntity>> test = new LinkedList<>();
|
||||
private final LinkedList<IMovableHandler> handlers = new LinkedList<>();
|
||||
private final DefaultSpatialHandler dsh = new DefaultSpatialHandler();
|
||||
|
||||
private final IMovableHandler nullHandler = new DefaultSpatialHandler();
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
{
|
||||
private static final int INITIAL_CAPACITY = 40;
|
||||
|
||||
private final Map<ItemStack, TunnelType> tunnels = new HashMap<ItemStack, TunnelType>( INITIAL_CAPACITY );
|
||||
private final Map<ItemStack, TunnelType> tunnels = new HashMap<>( INITIAL_CAPACITY );
|
||||
private final Map<String, TunnelType> modIdTunnels = new HashMap<>( INITIAL_CAPACITY );
|
||||
|
||||
public void configure()
|
||||
|
||||
@@ -43,8 +43,8 @@ import appeng.recipes.RecipeHandler;
|
||||
*/
|
||||
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>( 20 );
|
||||
private final Collection<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<>( 20 );
|
||||
private final Collection<ISubItemResolver> resolvers = new LinkedList<>();
|
||||
|
||||
@Override
|
||||
public void addNewCraftHandler( final String name, final Class<? extends ICraftHandler> handler )
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SpecialComparisonRegistry implements ISpecialComparisonRegistry
|
||||
|
||||
public SpecialComparisonRegistry()
|
||||
{
|
||||
this.CompRegistry = new ArrayList<IItemComparisonProvider>();
|
||||
this.CompRegistry = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
|
||||
public WirelessRegistry()
|
||||
{
|
||||
this.handlers = new ArrayList<IWirelessTermHandler>();
|
||||
this.handlers = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -115,8 +115,8 @@ public final class WorldGenRegistry implements IWorldGen
|
||||
private static class TypeSet
|
||||
{
|
||||
|
||||
final HashSet<Class<? extends WorldProvider>> badProviders = new HashSet<Class<? extends WorldProvider>>();
|
||||
final HashSet<Integer> badDimensions = new HashSet<Integer>();
|
||||
final HashSet<Integer> enabledDimensions = new HashSet<Integer>();
|
||||
final HashSet<Class<? extends WorldProvider>> badProviders = new HashSet<>();
|
||||
final HashSet<Integer> badDimensions = new HashSet<>();
|
||||
final HashSet<Integer> enabledDimensions = new HashSet<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class CellRegistry implements ICellRegistry
|
||||
|
||||
public CellRegistry()
|
||||
{
|
||||
this.handlers = new ArrayList<ICellHandler>();
|
||||
this.handlers = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -59,7 +59,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
|
||||
InscriberRecipe( @Nonnull final Collection<ItemStack> inputs, @Nonnull final ItemStack output, @Nullable final ItemStack top, @Nullable final ItemStack bot, @Nonnull final InscriberProcessType type )
|
||||
{
|
||||
this.inputs = new ArrayList<ItemStack>( inputs.size() );
|
||||
this.inputs = new ArrayList<>( inputs.size() );
|
||||
this.inputs.addAll( inputs );
|
||||
|
||||
this.output = output;
|
||||
|
||||
@@ -50,9 +50,9 @@ public final class InscriberRegistry implements IInscriberRegistry
|
||||
|
||||
public InscriberRegistry()
|
||||
{
|
||||
this.inputs = new HashSet<ItemStack>();
|
||||
this.optionals = new HashSet<ItemStack>();
|
||||
this.recipes = new HashSet<IInscriberRecipe>();
|
||||
this.inputs = new HashSet<>();
|
||||
this.optionals = new HashSet<>();
|
||||
this.recipes = new HashSet<>();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -128,7 +128,7 @@ public final class InscriberRegistry implements IInscriberRegistry
|
||||
@Override
|
||||
public Builder withInputs( @Nonnull final Collection<ItemStack> inputs )
|
||||
{
|
||||
this.inputs = new ArrayList<ItemStack>( inputs.size() );
|
||||
this.inputs = new ArrayList<>( inputs.size() );
|
||||
this.inputs.addAll( inputs );
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user