本文整理了Java中scala.collection.Iterator.filter()
方法的一些代码示例,展示了Iterator.filter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Iterator.filter()
方法的具体详情如下:
包路径:scala.collection.Iterator
类名称:Iterator
方法名:filter
暂无
代码示例来源:origin: org.locationtech.geomesa/geomesa-cqengine
private scala.collection.Iterator<SimpleFeature> getSimpleFeatureIteratorInternal(Intersects query,
final QueryOptions queryOptions) {
final Intersects intersects = query;
Envelope queryEnvelope = intersects.getEnvelope();
return index.query(queryEnvelope).filter(new AbstractFunction1<SimpleFeature, Object>() {
@Override
public Object apply(SimpleFeature feature) {
try {
Geometry geom = (Geometry) feature.getAttribute(geomAttributeIndex);
return intersects.matchesValue(geom, queryOptions);
} catch (Exception e) {
LOGGER.warn("Caught exception while trying to look up geometry", e);
return false;
}
}
});
}
代码示例来源:origin: uk.gov.gchq.gaffer/spark-accumulo-library
@Override
public Iterator<Element> apply(final Iterator<Map.Entry<Key, Value>> entryIterator) {
final EntryToElement entryToElement = new EntryToElement(serialisedConf);
return entryIterator
.map(entryToElement)
.filter(new FilterOutNull());
}
}
内容来源于网络,如有侵权,请联系作者删除!