We are cleaning up the core a little, and in the process eliminate usage of Java collections and replacing them with our own collections.


One of our contributors started with box2D, see this pull request.

从box2D我们的贡献者之一,看pull request.

In short:

  • methods that returned ArrayLists, such as body.getFixtureList(), now return Arrays
  • method calls to these objects will need to be change from ArrayList API to Array API, i.e. bodyFixtures.size() –> bodyFixures.size, bodyFixtures.isEmpty() –> (bodyFixtures.size == 0)


  • 方法返回值ArrayLists,例如body.getFixtureList(),现在返回Arrays
  • 方法调用这些对象将需要从ArrayList API改变为Array API,例如 bodyFixtures.size() -> bodyFixtures.size,bodyFixtures.isEmpty() -> (bodyFixtures.size == 0)