runeflobakk / motif

A Java library helping you to compose behavior from smaller parts.
http://runeflobakk.github.io/motif
6 stars 0 forks source link

More effective handling of iterating Strings and arrays #32

Closed runeflobakk closed 10 years ago

runeflobakk commented 10 years ago

Iterate.on(String) invokes toCharArray which effectively duplicates the characters of the given string. This is unnecessary.

Implement an abstract Iterator to better support iterating elements given a start and end index. Also provide implementation for iterating characters of a String, and most common arrays of primitives (byte, char, int).