org.geotools.filter.Filters.or()方法的使用及代码示例

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

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

Filters.or介绍

[英]Safe or combiner for filters, will build an and filter around them only if there is at least two filters
[中]过滤器的安全或组合器,仅当至少有两个过滤器时,才会在其周围构建and过滤器

代码示例

代码示例来源:origin: geotools/geotools

private Filter buildLocationsFilter(RasterManager manager, Set<String> locations) {
  PropertyName locationProperty = getLocationProperty(manager);
  List<Filter> filters =
      locations
          .stream()
          .map(l -> FF.equal(locationProperty, FF.literal(l), false))
          .collect(Collectors.toList());
  return Filters.or(FF, filters);
}

代码示例来源:origin: geotools/geotools

@Test
public void testOr() {
  Filter result = filters.or(ff, a, b);
  assertEquals(ff.or(a, b), result);
}

代码示例来源:origin: org.geotools/gt-jdbc

retFilter = Filters.and( ff, filter1, filter2 );
} else { //OR and AND only split types, this must be or.
  retFilter = Filters.or( ff, filter1, filter2 );

代码示例来源:origin: org.geotools/gt2-jdbc

retFilter = Filters.and( ff, filter1, filter2 );
} else { //OR and AND only split types, this must be or.
  retFilter = Filters.or( ff, filter1, filter2 );

相关文章