scala.collection.immutable.HashSet.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(128)

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

HashSet.<init>介绍

暂无

代码示例

代码示例来源:origin: FINRAOS/DataGenerator

/**
 * All data types that can be the first node added to a graph.
 * @return Set of types
 */
public HashSet<UserTypeVal> allInitialDataTypes() {
  if (allInitialDataTypes == null) {
    // Would be cleaner if we could call scala's apply method here, but it isn't part of a HashSet companion
    // object -- instead it lives in GenericCompanion, and it's unclear now to get to it from Java.
    allInitialDataTypes = new HashSet<>();
    allInitialDataTypes = allInitialDataTypes.$plus(UserType.ADMIN);
  }
  return allInitialDataTypes;
}

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

public scala.collection.immutable.Set<Acl> getAcls(final Resource resource) {
  final Option<scala.collection.immutable.Set<Acl>> acls = getAcls().get(resource);
  if (acls.nonEmpty())
    return acls.get();
  return new scala.collection.immutable.HashSet<Acl>();
}

代码示例来源:origin: FINRAOS/DataGenerator

/**
 * Get all data types
 * @return All data types in a HashSet
 */
public HashSet<UserTypeVal> allDataTypes() {
  if (allDataTypes == null) {
    // Would be cleaner if we could call scala's apply method here, but it isn't part of a HashSet companion
    // object -- instead it lives in GenericCompanion, and it's unclear now to get to it from Java.
    allDataTypes = new HashSet<>();
    allDataTypes = allDataTypes.$plus(UserType.ADMIN);
    allDataTypes = allDataTypes.$plus(UserType.PUBLIC_USER);
    allDataTypes = allDataTypes.$plus(UserType.SOCIAL_NETWORK_EMPLOYEE);
  }
  return allDataTypes;
}

代码示例来源:origin: apache/samza

TaskInstance createTaskInstance(AsyncStreamTask task, TaskName taskName, SystemStreamPartition ssp, OffsetManager manager, SystemConsumers consumers) {
 TaskModel taskModel = mock(TaskModel.class);
 when(taskModel.getTaskName()).thenReturn(taskName);
 TaskInstanceMetrics taskInstanceMetrics = new TaskInstanceMetrics("task", new MetricsRegistryMap());
 scala.collection.immutable.Set<SystemStreamPartition> sspSet = JavaConverters.asScalaSetConverter(Collections.singleton(ssp)).asScala().toSet();
 return new TaskInstance(task,
   taskModel,
   taskInstanceMetrics,
   null,
   consumers,
   mock(TaskInstanceCollector.class),
   manager,
   null,
   null,
   null,
   sspSet,
   new TaskInstanceExceptionHandler(taskInstanceMetrics, new scala.collection.immutable.HashSet<String>()),
   null,
   null,
   null,
   new scala.collection.immutable.HashSet<>(),
   null,
   mock(JobContext.class),
   mock(ContainerContext.class),
   Option.apply(null),
   Option.apply(null),
   Option.apply(null));
}

代码示例来源:origin: org.apache.kafka/kafka_2.11

scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);

代码示例来源:origin: org.apache.kafka/kafka

scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);

代码示例来源:origin: org.apache.kafka/kafka_2.12

scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka_2.11

scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);

相关文章

微信公众号

最新文章

更多