libgdx/libgdx — pull request #946 by carsten-engelke (2013-11-10 10:57:45+00:00)
Title: Update ArrayMap.java

Came across an error when iterating over the entries of an ArrayMap. Used to point to the same Entry-Instance each time with updated values only. This results in unwanted changes in priorly assigned Entry-Instances. See example:
```
private void testIterable() {

TestIterable t = new TestIterable();
for (Entry e : t) {
System.out.println(e.key + "=" + e.value);
}

Entry first = null;
Entry second = null;
Entry third = null;
int index = 0;

for (Entry e : t) {

if (index == 0) {
first = e;
}
if (index == 1) {
second = e;
}
if (index == 2) {
third = e;
}
index++;
}

System.out.println("FIRST: " + first + " SECOND: " + second + "THIRD: " + third);
System.out.println("Should have been: ");
System.out.println("FIRST: 1=aaa SECOND: 2=bbb THIRD: 3=ccc");
}

class TestIterable implements Iterable> {

com.badlogic.gdx.utils.ArrayMap map = new com.badlogic.gdx.utils.ArrayMap();
int iterate = 0;

public TestIterable() {

map.put(0, "aaa");
map.put(1, "bbb");
map.put(3, "ccc");
}

@Override
public Iterator> iterator() {

return map.entries();
}
}
```
PS: I am new to GitHub and wrote this (and the code) on the webpage. Hope it works though...