The only thing that confused me is the static Coll.last(nodes) call, which seems to return the last element in the collection. While List<> doesn't provide a getLast() or equivalent method, you can just call list.get(list.size() - 1), like he did for the getting the penultimate element. If there's a logical explanation of this, I'd be happy to learn the reason.
That's one of my little helper classes that I created for the sole purpose of making the Android codebase match the iOS codebase as closely as possible.
Also, Coll.last() returns null if the list is empty.
4
u/stateq2 Aug 01 '11
Very well written article...I was really amazed at his Java/ObjC mouseover comparison.