com.aol.cyclops.functionaljava.FromGuava Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-functionaljava Show documentation
Show all versions of cyclops-functionaljava Show documentation
Converters and Comprehenders for FunctionalJava
package com.aol.cyclops.functionaljava;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import fj.F;
import fj.data.Option;
public class FromGuava {
public static F f1(Function fn) {
return (t) -> fn.apply(t);
}
public static Option option(Optional o) {
if (o.isPresent())
return Option.some(o.get());
return Option.none();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy