public class Functional extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Functional.NotNull<X> |
Constructor and Description |
---|
Functional() |
Modifier and Type | Method and Description |
---|---|
static <X> boolean |
all(Collection<X> input,
Predicate<X> predicate) |
static <X> boolean |
any(Collection<X> input,
Predicate<X> predicate) |
static <X> List<X> |
filter(Collection<X> input,
Predicate<X> predicate) |
static <X> List<X> |
filterOptimistic(List<X> input,
Predicate<X> predicate) |
static <X> Set<X> |
filterSet(Collection<X> input,
Predicate<X> predicate) |
static <X> X |
findOrNull(Collection<X> input,
Predicate<X> predicate) |
static <Y,X> List<Y> |
groupBy(List<X> input,
Comparator<? super X> comparator,
UnaryFunction<List<X>,Y> gf) |
static <Y,X> Map<Y,List<X>> |
groupToMapBy(Collection<X> input,
Map<Y,List<X>> tgt,
UnaryFunction<X,Y> mapF) |
static <Y,X> Map<Y,List<X>> |
groupToMapBy(Collection<X> input,
UnaryFunction<X,Y> mapF) |
static <X> Map<X,Integer> |
indexedIdentityMapOf(Collection<X> input) |
static <X,Y> List<Y> |
map(Collection<X> input,
UnaryFunction<X,Y> function) |
static <X> Pair<List<X>,List<X>> |
partition(Collection<X> input,
Predicate<X> predicate) |
static <X> List<X> |
uniqAll(List<X> input) |
public static <X> List<X> filter(Collection<X> input, Predicate<X> predicate)
public static <X> X findOrNull(Collection<X> input, Predicate<X> predicate)
public static <X> Set<X> filterSet(Collection<X> input, Predicate<X> predicate)
public static <X> boolean any(Collection<X> input, Predicate<X> predicate)
public static <X> boolean all(Collection<X> input, Predicate<X> predicate)
public static <X> Pair<List<X>,List<X>> partition(Collection<X> input, Predicate<X> predicate)
public static <X,Y> List<Y> map(Collection<X> input, UnaryFunction<X,Y> function)
public static <X> Map<X,Integer> indexedIdentityMapOf(Collection<X> input)
public static <Y,X> Map<Y,List<X>> groupToMapBy(Collection<X> input, UnaryFunction<X,Y> mapF)
public static <Y,X> Map<Y,List<X>> groupToMapBy(Collection<X> input, Map<Y,List<X>> tgt, UnaryFunction<X,Y> mapF)
public static <Y,X> List<Y> groupBy(List<X> input, Comparator<? super X> comparator, UnaryFunction<List<X>,Y> gf)
Copyright © 2011-2021. All Rights Reserved.