本文整理了Java中org.apache.brooklyn.util.collections.MutableMap.keySet()
方法的一些代码示例,展示了MutableMap.keySet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MutableMap.keySet()
方法的具体详情如下:
包路径:org.apache.brooklyn.util.collections.MutableMap
类名称:MutableMap
方法名:keySet
暂无
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
public Builder<K, V> filterKeys(Predicate<? super K> filter) {
for (Iterator<K> iter = result.keySet().iterator(); iter.hasNext();) {
K key = iter.next();
if (!filter.apply(key)) iter.remove();
}
return this;
}
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
@SuppressWarnings("unchecked")
@Test
public void testJsonyaMapNew() {
MutableMap<Object, Object> m = europeMap().getRootMap();
Assert.assertEquals(Jsonya.of(m).get("europe", "uk", "edinburgh", "population"), 500*1000);
Assert.assertEquals(Jsonya.of(m).at("europe", "uk", "edinburgh", "population").get(), 500*1000);
Assert.assertEquals(((Map<Object,Object>)Jsonya.of(m).get("europe")).keySet(), ImmutableSet.of("uk", "france"));
Assert.assertEquals(Jsonya.of(m).at("europe").getFocusMap().keySet(), ImmutableSet.of("uk", "france"));
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-utils-common
@Test
public void testJsonyaMaybe() {
Navigator<MutableMap<Object, Object>> m = europeMap();
Assert.assertEquals( m.at("europe", "spain", "barcelona").getMaybe().or("norealabc"), "norealabc" );
Assert.assertEquals(m.root().at("europe").getFocusMap().keySet(), MutableSet.of("uk", "france"));
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
.filterValues(Predicates.not(Predicates.instanceOf(ConfigKey.class)))
.build()
.keySet();
Map<String, Object> persistableFlags = MutableMap.<String, Object>builder()
.putAll(FlagUtils.getFieldsWithFlagsExcludingModifiers(location, Modifier.STATIC ^ Modifier.TRANSIENT))
内容来源于网络,如有侵权,请联系作者删除!