UnmodifiableObservableMap.entrySet() is based on HashSet.
So when I use the following code the order is wrong:
{code}
final ObservableMap<String, Integer> map = FXCollections.observableMap(new TreeMap<>());
...
FXCollections.unmodifiableObservableMap(map).entrySet();
{code}
I think it would be good if the implementation of UnmodifiableObservableMap.entrySet() will be changed to:
{code}
@Override @ReturnsUnmodifiableCollection
public Set<Entry<K,V>> entrySet() {
return Collections.unmodifiableMap(backingMap).entrySet();
}
{code}
So when I use the following code the order is wrong:
{code}
final ObservableMap<String, Integer> map = FXCollections.observableMap(new TreeMap<>());
...
FXCollections.unmodifiableObservableMap(map).entrySet();
{code}
I think it would be good if the implementation of UnmodifiableObservableMap.entrySet() will be changed to:
{code}
@Override @ReturnsUnmodifiableCollection
public Set<Entry<K,V>> entrySet() {
return Collections.unmodifiableMap(backingMap).entrySet();
}
{code}