Array2DHashSet.toArray returns T[]

This commit is contained in:
Sam Harwell 2012-12-14 12:50:51 -06:00
parent f77cf59dbf
commit e259cea426
1 changed files with 2 additions and 2 deletions

View File

@ -234,8 +234,8 @@ public class Array2DHashSet<T> implements Set<T> {
}
@Override
public Object[] toArray() {
Object[] a = new Object[size()];
public T[] toArray() {
T[] a = createBucket(size());
int i = 0;
for (T[] bucket : buckets) {
if ( bucket==null ) continue;