com.aol.cyclops.javaslang.FromJDK Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-javaslang Show documentation
Show all versions of cyclops-javaslang Show documentation
Converters and Comprehenders for Javaslang
package com.aol.cyclops.javaslang;
import java.util.function.BiFunction;
import java.util.function.Function;
import javaslang.Function1;
import javaslang.Function2;
import javaslang.control.Option;
public class FromJDK {
public static Function1 f1(Function fn){
return (t) -> fn.apply(t);
}
public static Function2 f2(BiFunction fn){
return (t,x) -> fn.apply(t,x);
}
public static Option option(java.util.Optional o){
return Option.of(o.orElse(null));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy