functionalj.map.MapAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functionalj-core Show documentation
Show all versions of functionalj-core Show documentation
The module for FunctionalJ Core.
package functionalj.map;
import java.util.function.BiPredicate;
import java.util.function.Predicate;
import functionalj.function.Func2;
abstract class MapAction {
static class With extends MapAction {
final K key;
final V value;
With(K key, V value) {
this.key = key;
this.value = value;
}
}
static class FilterKey extends MapAction {
final Predicate super K> keyCheck;
FilterKey(Predicate super K> keyCheck) {
this.keyCheck = keyCheck;
}
}
static class FilterBoth extends MapAction {
final BiPredicate super K, ? super V> check;
FilterBoth(BiPredicate super K, ? super V> check) {
this.check = check;
}
}
static class Mapping extends MapAction {
final Func2 super K, ? super S, ? extends V> mapper;
public Mapping(final Func2 super K, ? super S, ? extends V> mapper) {
this.mapper = mapper;
}
}
}