本文整理汇总了Java中rx.functions.Func3.call方法的典型用法代码示例。如果您正苦于以下问题:Java Func3.call方法的具体用法?Java Func3.call怎么用?Java Func3.call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rx.functions.Func3
的用法示例。
在下文中一共展示了Func3.call方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleFind
import rx.functions.Func3; //导入方法依赖的package包/类
private boolean simpleFind(CodeArea area, String text, int offset) {
Func3<String, String, Integer, Integer> func = caseSensitive.isSelected() ? String::indexOf
: StringUtil::indexOfIgnoreCase;
int index = func.call(area.getText(), text, offset);
if (index != -1) {
area.selectRange(index, index + text.length());
return true;
}
return false;
}
示例2: bi1Operator
import rx.functions.Func3; //导入方法依赖的package包/类
/**
* Creates an OperatorScan instance which will replace the first element of a bivalue with the
* scan accumulator value.
*
* @param seed
* @param func
* @return
*/
public static <T0, T1, R0> BiOperator<R0, T1, T0, T1> bi1Operator(final R0 seed, final Func3<R0, ? super T0, ? super T1, R0> func) {
return new OperatorScan<R0, T1, T0, T1>(new BaseBiSubscriber<R0, T1, T0, T1>() {
R0 accum = seed;
@Override
protected void _onNext(T0 t0, T1 t1) {
accum = func.call(accum, t0, t1);
childOnNext(accum, t1);
}
});
}
示例3: bi2Operator
import rx.functions.Func3; //导入方法依赖的package包/类
/**
* Creates an OperatorScan instance which will replace the second element of a bivalue with the
* scan accumulator value.
*
* @param seed
* @param func
* @return
*/
public static <T0, T1, R1> BiOperator<T0, R1, T0, T1> bi2Operator(final R1 seed, final Func3<R1, ? super T0, ? super T1, R1> func) {
return new OperatorScan<T0, R1, T0, T1>(new BaseBiSubscriber<T0, R1, T0, T1>() {
R1 accum = seed;
@Override
protected void _onNext(T0 t0, T1 t1) {
accum = func.call(accum, t0, t1);
childOnNext(t0, accum);
}
});
}