When constructing a set with an array of values, copy and sort the array rather

than doing individual add()s.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2556 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-05-12 17:21:28 +00:00
parent ee688973dd
commit a0e960449c
@@ -41,7 +41,8 @@ public class ArrayIntSet extends AbstractSet<Integer>
public ArrayIntSet (int[] values)
{
this(values.length);
add(values);
System.arraycopy(values, 0, _values, 0, values.length);
Arrays.sort(_values);
}
/**