scala.collection.Map.keysIterator()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(13.0k)|赞(0)|评价(0)|浏览(146)

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

Map.keysIterator介绍

暂无

代码示例

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a Stream that traverses the keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the streamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamKeys(scala.collection.Map<K, ?> coll) {
  return StreamSupport.stream(new StepsAnyIterator<K>(coll.keysIterator()), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a Stream that traverses the keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the streamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamKeys(scala.collection.Map<K, ?> coll) {
  return StreamSupport.stream(new StepsAnyIterator<K>(coll.keysIterator()), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a Stream that traverses the keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the streamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamKeys(scala.collection.Map<K, ?> coll) {
  return StreamSupport.stream(new StepsAnyIterator<K>(coll.keysIterator()), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamAccumulatedKeys(scala.collection.Map<K, ?> coll) {
  scala.compat.java8.collectionImpl.Accumulator<K> acc = scala.compat.java8.collectionImpl.Accumulator.from(coll.keysIterator());
  return StreamSupport.stream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamAccumulatedKeys(scala.collection.Map<K, ?> coll) {
  scala.compat.java8.collectionImpl.Accumulator<K> acc = scala.compat.java8.collectionImpl.Accumulator.from(coll.keysIterator());
  return StreamSupport.stream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static <K> Stream<K> streamAccumulatedKeys(scala.collection.Map<K, ?> coll) {
  scala.compat.java8.collectionImpl.Accumulator<K> acc = scala.compat.java8.collectionImpl.Accumulator.from(coll.keysIterator());
  return StreamSupport.stream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a DoubleStream that traverses the double-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the doubleStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A DoubleStream view of the collection which, by default, executes sequentially.
 */
public static DoubleStream doubleStreamKeys(scala.collection.Map<Double, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a LongStream that traverses the long-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the longStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A LongStream view of the collection which, by default, executes sequentially.
 */
public static LongStream longStreamKeys(scala.collection.Map<Long, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.longStream(new StepsLongIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a IntStream that traverses the int-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the intStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A IntStream view of the collection which, by default, executes sequentially.
 */
public static IntStream intStreamKeys(scala.collection.Map<Integer, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.intStream(new StepsIntIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a IntStream that traverses the int-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the intStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A IntStream view of the collection which, by default, executes sequentially.
 */
public static IntStream intStreamKeys(scala.collection.Map<Integer, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.intStream(new StepsIntIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a LongStream that traverses the long-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the longStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A LongStream view of the collection which, by default, executes sequentially.
 */
public static LongStream longStreamKeys(scala.collection.Map<Long, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.longStream(new StepsLongIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a DoubleStream that traverses the double-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the doubleStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A DoubleStream view of the collection which, by default, executes sequentially.
 */
public static DoubleStream doubleStreamKeys(scala.collection.Map<Double, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a DoubleStream that traverses the double-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the doubleStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A DoubleStream view of the collection which, by default, executes sequentially.
 */
public static DoubleStream doubleStreamKeys(scala.collection.Map<Double, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.doubleStream(new StepsDoubleIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a IntStream that traverses the int-valued keys of a scala.collection.Map.
 * <p>
 * Only sequential operations will be efficient. 
 * For efficient parallel operation, use the intStreamAccumulatedKeys method instead, but
 * note that this creates a new collection containing the Map's keys.
 *
 * @param coll The Map to traverse
 * @return     A IntStream view of the collection which, by default, executes sequentially.
 */
public static IntStream intStreamKeys(scala.collection.Map<Integer, ?> coll) {
  scala.collection.Iterator iter = (scala.collection.Iterator)coll.keysIterator();
  return StreamSupport.intStream(new StepsIntIterator(iter), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static LongStream longStreamAccumulatedKeys(scala.collection.Map<Long, ?> coll) {
  scala.compat.java8.collectionImpl.LongAccumulator acc = 
   scala.compat.java8.collectionImpl.LongAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.longStream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static DoubleStream doubleStreamAccumulatedKeys(scala.collection.Map<Double, ?> coll) {
  scala.compat.java8.collectionImpl.DoubleAccumulator acc = 
   scala.compat.java8.collectionImpl.DoubleAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.doubleStream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.12

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static IntStream intStreamAccumulatedKeys(scala.collection.Map<Integer, ?> coll) {
  scala.compat.java8.collectionImpl.IntAccumulator acc = 
   scala.compat.java8.collectionImpl.IntAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.intStream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static DoubleStream doubleStreamAccumulatedKeys(scala.collection.Map<Double, ?> coll) {
  scala.compat.java8.collectionImpl.DoubleAccumulator acc = 
   scala.compat.java8.collectionImpl.DoubleAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.doubleStream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static LongStream longStreamAccumulatedKeys(scala.collection.Map<Long, ?> coll) {
  scala.compat.java8.collectionImpl.LongAccumulator acc = 
   scala.compat.java8.collectionImpl.LongAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.longStream(acc.spliterator(), false);
}

代码示例来源:origin: org.scala-lang.modules/scala-java8-compat_2.11

/** 
 * Generates a Stream that traverses the keys of any Scala map by
 * accumulating those keys into a buffer class (Accumulator).
 * <p>
 * Both sequential and parallel operations will be efficient.
 *
 * @param coll The map containing keys to traverse
 * @return     A Stream view of the collection which, by default, executes sequentially.
 */
public static IntStream intStreamAccumulatedKeys(scala.collection.Map<Integer, ?> coll) {
  scala.compat.java8.collectionImpl.IntAccumulator acc = 
   scala.compat.java8.collectionImpl.IntAccumulator.from((scala.collection.Iterator)coll.keysIterator());
  return StreamSupport.intStream(acc.spliterator(), false);
}

相关文章