本文整理了Java中cyclops.reactive.ReactiveSeq.xMatch
方法的一些代码示例,展示了ReactiveSeq.xMatch
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReactiveSeq.xMatch
方法的具体详情如下:
包路径:cyclops.reactive.ReactiveSeq
类名称:ReactiveSeq
方法名:xMatch
[英]Check that there are specified number of matches of predicate in the Stream
assertTrue(ReactiveSeq.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
[中]检查流中是否有指定数量的谓词匹配
assertTrue(ReactiveSeq.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
代码示例来源:origin: aol/cyclops
/**
* Check that there are specified number of matches of predicate in the Stream
*
* <pre>
* {@code
* assertTrue(Streamable.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
* }
* </pre>
*
*/
@Override
default boolean xMatch(final int num, final Predicate<? super T> c) {
return this.stream().xMatch(num, c);
}
代码示例来源:origin: aol/cyclops
/**
* Check that there are specified number of matches of predicate in the
* Stream
*
* <pre>
* {@code
* assertTrue(ReactiveSeq.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
* }
* </pre>
*
*/
default boolean xMatch(final int num, final Predicate<? super T> c) {
return stream().xMatch(num, c);
}
}
代码示例来源:origin: aol/cyclops
@SafeVarargs
public static <T1> Predicate<? super T1> xOf(final int x, final Predicate<? super T1>... preds) {
return test -> ReactiveSeq.of(preds)
.map(t -> t.test(test))
.xMatch(x, r -> r);
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(Spouts.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(ReactiveSeq.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: aol/cyclops
@Test
public void xMatch(){
assertTrue(Spouts.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
}
代码示例来源:origin: com.oath.cyclops/cyclops
/**
* Check that there are specified number of matches of predicate in the Stream
*
* <pre>
* {@code
* assertTrue(Streamable.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
* }
* </pre>
*
*/
@Override
default boolean xMatch(final int num, final Predicate<? super T> c) {
return this.stream().xMatch(num, c);
}
代码示例来源:origin: com.oath.cyclops/cyclops
/**
* Check that there are specified number of matches of predicate in the
* Stream
*
* <pre>
* {@code
* assertTrue(ReactiveSeq.of(1,2,3,5,6,7).xMatch(3, i-> i>4 ));
* }
* </pre>
*
*/
default boolean xMatch(final int num, final Predicate<? super T> c) {
return stream().xMatch(num, c);
}
}
代码示例来源:origin: com.oath.cyclops/cyclops
@SafeVarargs
public static <T1> Predicate<? super T1> xOf(final int x, final Predicate<? super T1>... preds) {
return test -> ReactiveSeq.of(preds)
.map(t -> t.test(test))
.xMatch(x, r -> r);
}
内容来源于网络,如有侵权,请联系作者删除!