Simplify ATNConfigSet.toArray

This commit is contained in:
Sam Harwell 2012-11-01 08:49:14 -05:00
parent 5a519b9222
commit ca38320d43
1 changed files with 2 additions and 7 deletions

View File

@ -463,17 +463,12 @@ public class ATNConfigSet implements Set<ATNConfig> {
@Override
public Object[] toArray() {
ATNConfig[] configs = new ATNConfig[configLookup.size()];
int i = 0;
for (ATNConfig c : configLookup) configs[i++] = c;
return configs;
return configLookup.toArray();
}
@Override
public <T> T[] toArray(T[] a) {
int i = 0;
for (ATNConfig c : configLookup) a[i++] = (T)c;
return a;
return configLookup.toArray(a);
}
@Override