本文整理了Java中fj.data.Option.valueE()
方法的一些代码示例,展示了Option.valueE()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.valueE()
方法的具体详情如下:
包路径:fj.data.Option
类名称:Option
方法名:valueE
[英]Returns the value of this optional value or fails with the given message.
[中]返回此可选值的值,或在给定消息中失败。
代码示例来源:origin: org.esupportail/esup-opi-utils
private LdapAttributes(
String uidAttribute,
String displayNameAttribute,
String emailAttribute,
String cnAttribute,
String nomUsuelAttribute,
String prenomAttribute,
String eduPersonPrincipalNameAttribute,
String filterPers) {
this.uidAttribute = fromNull(uidAttribute).valueE("uidAttribute is null !");
this.displayNameAttribute = fromNull(displayNameAttribute).valueE("displayNameAttribute is null !");
this.emailAttribute = fromNull(emailAttribute).valueE("emailAttribute us null !");
this.cnAttribute = fromNull(cnAttribute).valueE("cnAttribute is null !");
this.nomUsuelAttribute = fromNull(nomUsuelAttribute).valueE("nomUsuelAttribute is null !");
this.prenomAttribute = fromNull(prenomAttribute).valueE("prenomAttribute is null !");
this.eduPersonPrincipalNameAttribute =
fromNull(eduPersonPrincipalNameAttribute).valueE("eduPersonPrincipalName is null !");
this.filterPers = fromNull(filterPers).valueE("filterPers is null !");
}
代码示例来源:origin: org.functionaljava/functionaljava
public final A run() {
final F<IterV<E, A>, Option<A>> runCont =
new F<IterV<E, A>, Option<A>>() {
final F<P2<A, Input<E>>, Option<A>> done = F1Functions.andThen(P2.__1(), Option.some_());
final F<F<Input<E>, IterV<E, A>>, Option<A>> cont = Function.constant(Option.none());
@Override
public Option<A> f(final IterV<E, A> i) {
return i.fold(done, cont);
}
};
final F<P2<A, Input<E>>, A> done = P2.__1();
final F<F<Input<E>, IterV<E, A>>, A> cont =
k -> runCont.f(k.f(Input.eof())).valueE("diverging iteratee");
return fold(done, cont);
}
内容来源于网络,如有侵权,请联系作者删除!