本文整理了Java中org.apache.calcite.util.Util.toImmutableList()
方法的一些代码示例,展示了Util.toImmutableList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.toImmutableList()
方法的具体详情如下:
包路径:org.apache.calcite.util.Util
类名称:Util
方法名:toImmutableList
[英]Returns a Collector that accumulates the input elements into a Guava ImmutableList via a ImmutableList.Builder.
It will be obsolete when we move to Bug#upgrade, which has ImmutableList.toImmutableList().
[中]返回一个收集器,该收集器通过ImmutableList将输入元素累积到Guava ImmutableList中。建设者
当我们转向Bug#upgrade时,它将被淘汰,它具有不可变列表。toImmutableList()。
代码示例来源:origin: org.apache.calcite/calcite-core
/** Generates a map of variables and lists of values that could be assigned
* to them. */
public Iterable<Map<RexNode, Comparable>> assignments() {
final List<List<Comparable>> generators =
variables.stream().map(RexAnalyzer::getComparables)
.collect(Util.toImmutableList());
final Iterable<List<Comparable>> product = Linq4j.product(generators);
//noinspection StaticPseudoFunctionalStyleMethod
return Iterables.transform(product,
values -> ImmutableMap.copyOf(Pair.zip(variables, values)));
}
代码示例来源:origin: org.apache.calcite/calcite-core
/**
* Creates an identifier that consists of this identifier plus a wildcard star.
* Does not modify this identifier.
*/
public SqlIdentifier plusStar() {
final SqlIdentifier id = this.plus("*", SqlParserPos.ZERO);
return new SqlIdentifier(
id.names.stream().map(s -> s.equals("*") ? "" : s)
.collect(Util.toImmutableList()),
null, id.pos, id.componentPositions);
}
代码示例来源:origin: Qihoo360/Quicksql
/** Generates a map of variables and lists of values that could be assigned
* to them. */
public Iterable<Map<RexNode, Comparable>> assignments() {
final List<List<Comparable>> generators =
variables.stream().map(RexAnalyzer::getComparables)
.collect(Util.toImmutableList());
final Iterable<List<Comparable>> product = Linq4j.product(generators);
//noinspection StaticPseudoFunctionalStyleMethod
return Iterables.transform(product,
values -> ImmutableMap.copyOf(Pair.zip(variables, values)));
}
代码示例来源:origin: Qihoo360/Quicksql
/**
* Creates an identifier that consists of this identifier plus a wildcard star.
* Does not modify this identifier.
*/
public SqlIdentifier plusStar() {
final SqlIdentifier id = this.plus("*", SqlParserPos.ZERO);
return new SqlIdentifier(
id.names.stream().map(s -> s.equals("*") ? "" : s)
.collect(Util.toImmutableList()),
null, id.pos, id.componentPositions);
}
代码示例来源:origin: Qihoo360/Quicksql
private static <E> Iterable<String> toStringList(Iterable<E> items) {
return StreamSupport.stream(items.spliterator(), false)
.map(Object::toString)
.collect(Util.toImmutableList());
}
代码示例来源:origin: org.apache.calcite/calcite-core
private static <E> Iterable<String> toStringList(Iterable<E> items) {
return StreamSupport.stream(items.spliterator(), false)
.map(Object::toString)
.collect(Util.toImmutableList());
}
代码示例来源:origin: Qihoo360/Quicksql
final List<Profiler.Statistic> statistics =
profile.statistics().stream().filter(predicate)
.collect(Util.toImmutableList());
代码示例来源:origin: org.apache.calcite/calcite-core
table.t.getQualifiedName())
.sorted(Comparator.comparing(Object::toString))
.collect(Util.toImmutableList());
assertThat(tableNames.toString(),
is("[[foodmart, customer],"
代码示例来源:origin: org.apache.calcite/calcite-core
final List<Profiler.Statistic> statistics =
profile.statistics().stream().filter(predicate)
.collect(Util.toImmutableList());
内容来源于网络,如有侵权,请联系作者删除!