Skip to content

ziggy42/minifunk

Repository files navigation

minifunk

Download

This library targets Java 6 and wraps a T[] or List<T> to add:

  • allMatch
  • anyMatch
  • count
  • distinct
  • filter
  • findFirst
  • flatMap
  • forEach
  • limit
  • map
  • max
  • min
  • noneMatch
  • skip
  • sorted

Example

Stream
    .of("apple", "pear", "lemon")
    .filter(new Predicate<String>() {
        @Override
        public boolean test(String value) {
            return value.length() > 4;
        }
    })
    .forEach(new Consumer<String>() {
        @Override   
        public void accept(String value) {
            System.out.println(value);
        }
    });

Usage

Add repository:

repositories {
    maven {
        url  "http://dl.bintray.com/ziggy42/minifunk"
    }
    ...
}

Add dependency:

dependencies {
    compile 'com.andreapivetta.minifunk:minifunk:0.0.1'
    ...
}

Releases

No releases published

Packages

No packages published

Languages