Skip to content

EricKwon94/LLStream

Repository files navigation

LLStream

This stream API can use under API level 24

Setup

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

dependencies {
	implementation 'com.github.kss2:LLStream:1.0.2'
}

Usage

String[] result = LLStream.filter(str, s -> s.equals("a"));
Person[] result2 = LLStream.filter(people, elem -> elem.age == 10);
int[] result3 = LLStream.filter(nums, elem -> elem == 1);
ArrayList<Integer> result4 = LLStream.filter(list, elem -> elem == 1);
TreeMap<String, Integer> result5 = LLStream.filter(map, elem -> elem.getKey().equals("banana"));
TreeSet<Integer> result6 = LLStream.filter(set, elem -> elem == 3);

Method

filter
reduce
any
all
count
skip
skipLast
take
takeLast
skipTake
skipTakeLast
indexOf (predicate)
get (findByIndex or findByPredicate)
getOrDefault (findByIndex or findByPredicate)
single(predicate)
singleOrDefault(predicate)

License

LLStream is under MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages