SortedDictionary instead of LinkedHashMap

This commit is contained in:
Sam Harwell 2013-02-19 15:21:03 -06:00
parent 2f217b5241
commit 24f30a607e
2 changed files with 2 additions and 2 deletions

View File

@ -282,7 +282,7 @@ namespace Antlr4.Runtime.Dfa
catch (NotSupportedException)
{
// handles read only, non-singleton maps
map = new LinkedHashMap<int, DFAState>(map);
map = new SortedDictionary<int, DFAState>(map);
map.Put(PredictionContext.EmptyFullStateKey, Sharpen.Collections.Remove(map, -1));
}
}

View File

@ -206,7 +206,7 @@ namespace Antlr4.Runtime.Dfa
{
return Sharpen.Collections.EmptyMap<int, T>();
}
IDictionary<int, T> result = new LinkedHashMap<int, T>();
IDictionary<int, T> result = new SortedDictionary<int, T>();
for (int i = 0; i < Count; i++)
{
result[keys[i]] = values[i];