org.apache.edgent.function.Functions.alwaysTrue()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(136)

本文整理了Java中org.apache.edgent.function.Functions.alwaysTrue()方法的一些代码示例,展示了Functions.alwaysTrue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.alwaysTrue()方法的具体详情如下:
包路径:org.apache.edgent.function.Functions
类名称:Functions
方法名:alwaysTrue

Functions.alwaysTrue介绍

[英]A Predicate that is always true
[中]始终为真的谓词

代码示例

代码示例来源:origin: apache/incubator-edgent

/**
 * Capture the first and every nth tuple
 * @param count the nth value interval
 */
public void setCaptureByCount(int count) {
 if (count == 1)
  setCaptureByPredicate(Functions.alwaysTrue());
 else
  setCaptureByPredicate(newByCountPredicate(count));
}

代码示例来源:origin: apache/incubator-edgent

@Test
public void testAlwaysTrue() {
  assertTrue(Functions.alwaysTrue().test("hello"));
  assertTrue(Functions.alwaysTrue().test(42));
  assertTrue(Functions.alwaysTrue().test(new Object()));
}
@Test

代码示例来源:origin: apache/incubator-edgent

Functions.alwaysTrue());

相关文章