本文整理了Java中scala.collection.immutable.HashSet
类的一些代码示例,展示了HashSet
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HashSet
类的具体详情如下:
包路径:scala.collection.immutable.HashSet
类名称:HashSet
暂无
代码示例来源:origin: org.apache.kafka/kafka
scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);
allScenarioOptions.$plus(byDurationOption);
allScenarioOptions.$plus(toEarliestOption);
allScenarioOptions.$plus(toLatestOption);
allScenarioOptions.$plus(fromFileOption);
allScenarioOptions.$plus(shiftByOption);
CommandLineUtils.checkInvalidArgs(optionParser, options, toOffsetOption, allScenarioOptions.$minus(toOffsetOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toDatetimeOption, allScenarioOptions.$minus(toDatetimeOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, byDurationOption, allScenarioOptions.$minus(byDurationOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toEarliestOption, allScenarioOptions.$minus(toEarliestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toLatestOption, allScenarioOptions.$minus(toLatestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, fromFileOption, allScenarioOptions.$minus(fromFileOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, shiftByOption, allScenarioOptions.$minus(shiftByOption));
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a Stream that traverses a scala.collection.immutable.HashSet.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.immutable.HashSet<T> coll) {
return StreamSupport.stream(new StepsAnyImmHashSet<T>(coll.iterator(), coll.size()), false);
}
代码示例来源: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.12
scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);
allScenarioOptions.$plus(byDurationOption);
allScenarioOptions.$plus(toEarliestOption);
allScenarioOptions.$plus(toLatestOption);
allScenarioOptions.$plus(fromFileOption);
allScenarioOptions.$plus(shiftByOption);
CommandLineUtils.checkInvalidArgs(optionParser, options, toOffsetOption, allScenarioOptions.$minus(toOffsetOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toDatetimeOption, allScenarioOptions.$minus(toDatetimeOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, byDurationOption, allScenarioOptions.$minus(byDurationOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toEarliestOption, allScenarioOptions.$minus(toEarliestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toLatestOption, allScenarioOptions.$minus(toLatestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, fromFileOption, allScenarioOptions.$minus(fromFileOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, shiftByOption, allScenarioOptions.$minus(shiftByOption));
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a Stream that traverses a scala.collection.immutable.HashSet.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.immutable.HashSet<T> coll) {
return StreamSupport.stream(new StepsAnyImmHashSet<T>(coll.iterator(), coll.size()), false);
}
代码示例来源:origin: org.apache.kafka/kafka_2.11
scala.collection.immutable.HashSet<OptionSpec<?>> allScenarioOptions = new scala.collection.immutable.HashSet<>();
allScenarioOptions.$plus(toOffsetOption);
allScenarioOptions.$plus(toDatetimeOption);
allScenarioOptions.$plus(byDurationOption);
allScenarioOptions.$plus(toEarliestOption);
allScenarioOptions.$plus(toLatestOption);
allScenarioOptions.$plus(fromFileOption);
allScenarioOptions.$plus(shiftByOption);
CommandLineUtils.checkInvalidArgs(optionParser, options, toOffsetOption, allScenarioOptions.$minus(toOffsetOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toDatetimeOption, allScenarioOptions.$minus(toDatetimeOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, byDurationOption, allScenarioOptions.$minus(byDurationOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toEarliestOption, allScenarioOptions.$minus(toEarliestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toLatestOption, allScenarioOptions.$minus(toLatestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, fromFileOption, allScenarioOptions.$minus(fromFileOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, shiftByOption, allScenarioOptions.$minus(shiftByOption));
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a Stream that traverses a scala.collection.immutable.HashSet.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A Stream view of the collection which, by default, executes sequentially.
*/
public static <T> Stream<T> stream(scala.collection.immutable.HashSet<T> coll) {
return StreamSupport.stream(new StepsAnyImmHashSet<T>(coll.iterator(), coll.size()), false);
}
代码示例来源: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);
allScenarioOptions.$plus(byDurationOption);
allScenarioOptions.$plus(toEarliestOption);
allScenarioOptions.$plus(toLatestOption);
allScenarioOptions.$plus(fromFileOption);
allScenarioOptions.$plus(shiftByOption);
CommandLineUtils.checkInvalidArgs(optionParser, options, toOffsetOption, allScenarioOptions.$minus(toOffsetOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toDatetimeOption, allScenarioOptions.$minus(toDatetimeOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, byDurationOption, allScenarioOptions.$minus(byDurationOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toEarliestOption, allScenarioOptions.$minus(toEarliestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, toLatestOption, allScenarioOptions.$minus(toLatestOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, fromFileOption, allScenarioOptions.$minus(fromFileOption));
CommandLineUtils.checkInvalidArgs(optionParser, options, shiftByOption, allScenarioOptions.$minus(shiftByOption));
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a DoubleStream that traverses a scala.collection.immutable.HashSet of Doubles.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.immutable.HashSet<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a DoubleStream that traverses a scala.collection.immutable.HashSet of Doubles.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.immutable.HashSet<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a IntStream that traverses a scala.collection.immutable.HashSet of Ints.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.immutable.HashSet<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a IntStream that traverses a scala.collection.immutable.HashSet of Ints.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.immutable.HashSet<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a IntStream that traverses a scala.collection.immutable.HashSet of Ints.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A IntStream view of the collection which, by default, executes sequentially.
*/
public static IntStream intStream(scala.collection.immutable.HashSet<Integer> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.intStream(new StepsIntImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a DoubleStream that traverses a scala.collection.immutable.HashSet of Doubles.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A DoubleStream view of the collection which, by default, executes sequentially.
*/
public static DoubleStream doubleStream(scala.collection.immutable.HashSet<Double> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.doubleStream(new StepsDoubleImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11
/**
* Generates a LongStream that traverses a scala.collection.immutable.HashSet of Longs.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.immutable.HashSet<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12
/**
* Generates a LongStream that traverses a scala.collection.immutable.HashSet of Longs.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.immutable.HashSet<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongImmHashSet(iter, coll.size()), false);
}
代码示例来源:origin: org.scala-lang.modules/scala-java8-compat
/**
* Generates a LongStream that traverses a scala.collection.immutable.HashSet of Longs.
* <p>
* Both sequential and parallel operations will be efficient.
*
* @param coll The immutable.HashSet to traverse
* @return A LongStream view of the collection which, by default, executes sequentially.
*/
public static LongStream longStream(scala.collection.immutable.HashSet<Long> coll) {
scala.collection.Iterator iter = (scala.collection.Iterator)coll.iterator();
return StreamSupport.longStream(new StepsLongImmHashSet(iter, coll.size()), false);
}
内容来源于网络,如有侵权,请联系作者删除!