本文整理了Java中scala.collection.mutable.Map.put()
方法的一些代码示例,展示了Map.put()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Map.put()
方法的具体详情如下:
包路径:scala.collection.mutable.Map
类名称:Map
方法名:put
暂无
代码示例来源:origin: goldmansachs/gs-collections
@Setup
public void setUp()
{
Random random = new Random(123456789012345L);
this.elements = new String[this.size];
this.scalaAnyRefMap = new AnyRefMap<>(this.size);
for (int i = 0; i < this.size; i++)
{
String element = RandomStringUtils.random(RANDOM_COUNT, 0, 0, false, true, null, random);
this.elements[i] = element;
this.scalaAnyRefMap.put(element, "dummy");
}
}
代码示例来源:origin: goldmansachs/gs-collections
@Setup
public void setUp()
{
Random random = new Random(123456789012345L);
this.elements = new String[this.size];
this.scalaMap = new PresizableHashMap<>(this.size);
for (int i = 0; i < this.size; i++)
{
String element = RandomStringUtils.random(RANDOM_COUNT, 0, 0, false, true, null, random);
this.elements[i] = element;
this.scalaMap.put(element, "dummy");
}
}
代码示例来源:origin: goldmansachs/gs-collections
@Benchmark
public Map<String, String> scalaAnyRef()
{
int localSize = this.size;
String[] localElements = this.elements;
Map<String, String> scalaAnyRefMap = this.isPresized ? new AnyRefMap<>(localSize) : new AnyRefMap<>();
for (int i = 0; i < localSize; i++)
{
scalaAnyRefMap.put(localElements[i], "dummy");
}
return scalaAnyRefMap;
}
}
代码示例来源:origin: linkedin/cruise-control
newReplicaAssignment.put(new TopicAndPartition(topic, pm.partition()),
JavaConverters.asScalaIteratorConverter(newAssignedReplica.iterator()).asScala().toSeq());
代码示例来源:origin: guru.nidi/text-transform
public static void setAttribute(Segment segment, Attribute name, Object value) {
segment.attributes().put(name, value);
}
}
内容来源于网络,如有侵权,请联系作者删除!