Replaced LinkedList with ArrayList or ArrayDeque when applicable. (#3392)
This commit is contained in:
@@ -22,9 +22,9 @@ package appeng.core.api;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ApiPart implements IPartHelper
|
||||
} );
|
||||
|
||||
private final Map<Class<?>, String> interfaces2Layer = new HashMap<>();
|
||||
private final List<String> desc = new LinkedList<>();
|
||||
private final List<String> desc = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Conceptually this method will build a new class hierarchy that is rooted at the given base class, and includes a
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
package appeng.core.features.registries;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -39,8 +40,8 @@ public class MovableTileRegistry implements IMovableRegistry
|
||||
private final HashSet<Block> blacklisted = new HashSet<>();
|
||||
|
||||
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 List<Class<? extends TileEntity>> test = new ArrayList<>();
|
||||
private final List<IMovableHandler> handlers = new ArrayList<>();
|
||||
private final DefaultSpatialHandler dsh = new DefaultSpatialHandler();
|
||||
|
||||
private final IMovableHandler nullHandler = new DefaultSpatialHandler();
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
package appeng.core.features.registries;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -44,7 +44,7 @@ import appeng.recipes.RecipeHandler;
|
||||
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<>( 20 );
|
||||
private final Collection<ISubItemResolver> resolvers = new LinkedList<>();
|
||||
private final Collection<ISubItemResolver> resolvers = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void addNewCraftHandler( final String name, final Class<? extends ICraftHandler> handler )
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.BufferOverflowException;
|
||||
import java.util.LinkedList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
@@ -77,7 +77,7 @@ public class PacketMEInventoryUpdate extends AppEngPacket
|
||||
{
|
||||
this.data = null;
|
||||
this.compressFrame = null;
|
||||
this.list = new LinkedList<>();
|
||||
this.list = new ArrayList<>();
|
||||
this.ref = stream.readByte();
|
||||
|
||||
// int originalBytes = stream.readableBytes();
|
||||
|
||||
@@ -23,8 +23,8 @@ import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -101,7 +101,7 @@ final class SpawnData implements IWorldSpawnData
|
||||
@Override
|
||||
public Collection<NBTTagCompound> getNearByMeteorites( final int dim, final int chunkX, final int chunkZ )
|
||||
{
|
||||
final Collection<NBTTagCompound> ll = new LinkedList<>();
|
||||
final Collection<NBTTagCompound> ll = new ArrayList<>();
|
||||
|
||||
synchronized( SpawnData.class )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user