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

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

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

Map.keys介绍

暂无

代码示例

代码示例来源:origin: linkedin/cruise-control

/**
 * Check whether the topic has partitions undergoing partition reassignment and wait for the reassignments to finish.
 *
 * @param zkUtils the ZkUtils class used to check ongoing partition reassignments.
 * @return Whether there are no ongoing partition reassignments.
 */
public static boolean ensureTopicNotUnderPartitionReassignment(ZkUtils zkUtils, String topic) {
 int attempt = 0;
 while (JavaConversions.asJavaCollection(zkUtils.getPartitionsBeingReassigned().keys()).stream()
            .anyMatch(tp -> tp.topic().equals(topic))) {
  try {
   sleep(1000 << attempt);
  } catch (InterruptedException e) {
   // Let it go.
  }
  if (++attempt == 10) {
   return false;
  }
 }
 return true;
}

代码示例来源:origin: kframework/k

if (hook.equals("KREFLECTION.fresh")) {
  sb.append(conn).append("freshFunction (sort: string) (config: k) (counter: Z.t) : k = match sort with \n");
  for (Sort sort : iterable(mainModule.freshFunctionFor().keys())) {
    sb.append("| \"").append(sort.toString()).append("\" -> (");
    KLabel freshFunction = mainModule.freshFunctionFor().apply(sort);

代码示例来源:origin: ch.epfl.gsn/gsn-core

Map<String,String> init=vs.processing().initParams();
ArrayList<KeyValue> ini=new ArrayList<KeyValue>();
Iterable<String> initkeys=JavaConversions.asJavaIterable(init.keys());
for (String ik:initkeys){
  logger.trace("keys:"+ik);

相关文章