All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functionalj.map.MapAction Maven / Gradle / Ivy

There is a newer version: 1.0.17
Show newest version
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 keyCheck;
        FilterKey(Predicate keyCheck) {
            this.keyCheck = keyCheck;
        }
    }
    static class FilterBoth extends MapAction {
        final BiPredicate check;
        FilterBoth(BiPredicate check) {
            this.check = check;
        }
    }
    static class Mapping extends MapAction {
        final Func2 mapper;
        public Mapping(final Func2 mapper) {
            this.mapper = mapper;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy