brooklyn.util.collections.MutableMap.<init>()方法的使用及代码示例

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

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

MutableMap.<init>介绍

暂无

代码示例

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

/** creates a {@link Navigator} backed by a newly created map;
 * the map can be accessed by {@link Navigator#getMap()} */
public static Navigator<MutableMap<Object,Object>> newInstance() {
  return new Navigator<MutableMap<Object,Object>>(new MutableMap<Object,Object>(), MutableMap.class);
}
/** convenience for {@link Navigator#at(Object, Object...)} on a {@link #newInstance()} */

代码示例来源:origin: io.brooklyn/brooklyn-core

@Override
public FixedListMachineProvisioningLocation<SshMachineLocation> newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-core

@SuppressWarnings("rawtypes")
@Override
public Location newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> copyOf(@Nullable Map<? extends K, ? extends V> orig) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  if (orig!=null)
    result.putAll(orig);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-core

@Override
public Location newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-core

@Override
public final Location resolve(String spec) {
  return resolve(spec, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-core

@Override
public Location newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-locations-jclouds

@Override
public JcloudsLocation newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-locations-jclouds

@Override
public FixedListMachineProvisioningLocation<JcloudsSshMachineLocation> newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-systems-openshift

@Override
public Location newLocationFromString(Map properties, String spec) {
  return newLocationFromString(spec, null, properties, new MutableMap());
}

代码示例来源:origin: io.brooklyn/brooklyn-core

@Override
public int execCommands(Map<String,?> props, List<String> commands, Map<String,?> env) {
  Map<String,Object> props2 = new MutableMap<String,Object>();
  if (props!=null) props2.putAll(props);
  props2.put(SshTool.PROP_NO_EXTRA_OUTPUT.getName(), true);
  return execScript(props2, commands, env);
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  result.put(k3, v3);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3,K k4, V v4) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  result.put(k3, v3);
  result.put(k4, v4);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3,K k4, V v4,K k5, V v5) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  result.put(k3, v3);
  result.put(k4, v4);
  result.put(k5, v5);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3,K k4, V v4,K k5, V v5,K k6,V v6) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  result.put(k3, v3);
  result.put(k4, v4);
  result.put(k5, v5);
  result.put(k6, v6);
  return result;
}

代码示例来源:origin: io.brooklyn/brooklyn-core

public Location resolveLocationDefinition(LocationDefinition ld, Map locationFlags, String optionalName) {
  MutableMap newLocationFlags = new MutableMap().add(locationFlags).add(ld.getConfig());
  if (optionalName==null && ld.getName()!=null) optionalName = ld.getName();
  if (optionalName!=null) newLocationFlags.add("named", optionalName);
  try {
    return resolve(ld.getSpec(), newLocationFlags);
  } catch (Exception e) {
    throw new IllegalStateException("Cannot instantiate named location '"+optionalName+"' pointing at "+ld.getSpec()+": "+e, e);
  }
}

代码示例来源:origin: io.brooklyn/brooklyn-utils-common

public static <K,V> MutableMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3,K k4, V v4,K k5, V v5,K k6,V v6,K k7,V v7) {
  MutableMap<K,V> result = new MutableMap<K,V>();
  result.put(k1, v1);
  result.put(k2, v2);
  result.put(k3, v3);
  result.put(k4, v4);
  result.put(k5, v5);
  result.put(k6, v6);
  result.put(k7, v7);
  return result;
 }

代码示例来源:origin: io.brooklyn/brooklyn-rest-server

public static LinkWithMetadata asLink(Task<?> t) {
  if (t==null) return null;
  MutableMap<String,Object> data = new MutableMap<String,Object>();
  data.put("id", t.getId());
  if (t.getDisplayName()!=null) data.put("taskName", t.getDisplayName());
  Entity entity = BrooklynTasks.getContextEntity(t);
  if (entity!=null) {
    data.put("entityId", entity.getId());
    if (entity.getDisplayName()!=null) data.put("entityDisplayName", entity.getDisplayName());
  }
  return new LinkWithMetadata("/v1/activities/"+t.getId(), data);
}

相关文章