We know exactly how big this ArrayList will be, so let's be efficient.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2566 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -95,7 +95,7 @@ public class CollectionUtil
|
|||||||
throw new IllegalArgumentException(errmsg);
|
throw new IllegalArgumentException(errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<T> subset = new ArrayList<T>();
|
ArrayList<T> subset = new ArrayList<T>(count);
|
||||||
Iterator<T> iter = col.iterator();
|
Iterator<T> iter = col.iterator();
|
||||||
int s = 0;
|
int s = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user