Add java.lang.Iterable.spliterator() and supporting classes.
The only android specific changes here are to HashMap - their
spliterators add Spliterator.ORDERED if the HashMap is an instance
of a LinkedHashMap.
There's some degree of duplication between the test code used to
exercise primitive arrays (Arrays / Spliterators provide similar
APIs). These differences are quite hard to consolidate, since the
Arrays version declares that their Spliterators are ORDERED but
the Spliterator version doesn't. The latter also allows us to declare
additional Spliterator characteristics.
bug: 27426688
Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
42 files changed