org.apache.calcite.util.Util.immutableCopy()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(117)

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

Util.immutableCopy介绍

[英]Returns a copy of a list of lists, making the component lists immutable if they are not already.
[中]返回列表列表的副本,如果组件列表尚未设置,则使其不可变。

代码示例

代码示例来源:origin: Qihoo360/Quicksql

protected CalciteCatalogReader(CalciteSchema rootSchema,
  SqlNameMatcher nameMatcher, List<List<String>> schemaPaths,
  RelDataTypeFactory typeFactory, CalciteConnectionConfig config) {
 this.rootSchema = Objects.requireNonNull(rootSchema);
 this.nameMatcher = nameMatcher;
 this.schemaPaths =
   Util.immutableCopy(Util.isDistinct(schemaPaths)
     ? schemaPaths
     : new LinkedHashSet<>(schemaPaths));
 this.typeFactory = typeFactory;
 this.config = config;
}

代码示例来源:origin: org.apache.calcite/calcite-core

protected CalciteCatalogReader(CalciteSchema rootSchema,
  SqlNameMatcher nameMatcher, List<List<String>> schemaPaths,
  RelDataTypeFactory typeFactory, CalciteConnectionConfig config) {
 this.rootSchema = Objects.requireNonNull(rootSchema);
 this.nameMatcher = nameMatcher;
 this.schemaPaths =
   Util.immutableCopy(Util.isDistinct(schemaPaths)
     ? schemaPaths
     : new LinkedHashSet<>(schemaPaths));
 this.typeFactory = typeFactory;
 this.config = config;
}

代码示例来源:origin: org.apache.calcite/calcite-core

final List<List<Integer>> immutableList301 = Util.immutableCopy(list301);
assertThat(immutableList301.size(), is(3));
assertThat(immutableList301, is(list301));
  Util.immutableCopy(immutableList301);
assertThat(immutableList301b, sameInstance(immutableList301));
assertThat(immutableList301b, not(sameInstance(list301)));
final List<List<Integer>> list301d = Util.immutableCopy(list301c);
assertThat(list301d.size(), is(3));
assertThat(list301d, is(list301));

代码示例来源:origin: Qihoo360/Quicksql

final List<List<Integer>> immutableList301 = Util.immutableCopy(list301);
assertThat(immutableList301.size(), is(3));
assertThat(immutableList301, is(list301));
  Util.immutableCopy(immutableList301);
assertThat(immutableList301b, sameInstance(immutableList301));
assertThat(immutableList301b, not(sameInstance(list301)));
final List<List<Integer>> list301d = Util.immutableCopy(list301c);
assertThat(list301d.size(), is(3));
assertThat(list301d, is(list301));

相关文章