Support more of the functions from guava iterables

Issue #24 resolved
Anund McKague created an issue

Iterables would be simpler to use if it had it's own copy of the guava iterables functions

* concat (concat(Iterable, Iterable) concat(Iterable, Iterable, Iterable) and so on)
* cycle
* find
* get getFirst getLast 
* indexOf
* partition
* remove/retain
* take/take while
* drop/drop while

Comments (3)

  1. Anund McKague reporter
    • find is replaced by findFirst
    • take/drop/partition are already implemented
    • remove/retain are just different names for filters
    • get getFirst getLast indexOf can be maintained by guava

    That leaves

    • concat
    • cycle
    • take while
    • drop while
    • foldleft and foldright might be worth adding
  2. Anund McKague reporter
    • elementsEqual(Iterable<?> iterable1, Iterable<?> iterable2) - Determines whether two iterables contain equal elements in the same order.
    • filter(Iterable<?> unfiltered, Class<T> type)
    • frequency(Iterable<?> iterable, Object element) - Returns the number of elements in the specified iterable that equal the specified object.
    • toArray(Iterable<? extends T> iterable, Class<T> type) - Copies an iterable's elements into an array.
  3. Anund McKague reporter

    I'm choosing not to implement the remaining duplicate methods for now. Folds should be brought up as a separate piece of work.

  4. Log in to comment