Logistical Transporters work & don't crash!

This commit is contained in:
aidancbrady committed 2016-05-23 21:09:18 -04:00
1 parent 60b9db3163
commit f808b987f5
6 files changed
+41 -19

No files matched your search

@@ -6,6 +6,13 @@ import java.util.Iterator;
public class HashList<T> implements Iterable<T>
{
private ArrayList<T> list = new ArrayList<T>(256);
private HashList(ArrayList<T> newList)
{
list = newList;
}
public HashList() {}
public boolean contains(T obj)
{
@@ -91,6 +98,12 @@ public class HashList<T> implements Iterable<T>
return list.size();
}
@Override
public HashList<T> clone()
{
return new HashList((ArrayList)list.clone());
}
public void swap(int source, int target)
{
// Make sure both source and target are legal values