congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TreeMap.putAll
Code IndexAdd Tabnine to your IDE (free)

How to use
putAll
method
in
java.util.TreeMap

Best Java code snippets using java.util.TreeMap.putAll (Showing top 20 results out of 2,178)

origin: jenkinsci/jenkins

protected Map<K,V> copy() {
  TreeMap<K,V> m = new TreeMap<K,V>(comparator);
  m.putAll(core);
  return m;
}
origin: goldmansachs/gs-collections

public void putAll(Map<? extends K, ? extends V> map)
{
  this.treeMap.putAll(map);
}
origin: sannies/mp4parser

public void putAll(Map<? extends K, ? extends V> m) {
  base.putAll(m);
}
origin: goldmansachs/gs-collections

public TreeSortedMap(Comparator<? super K> comparator, Map<? extends K, ? extends V> map)
{
  this.treeMap = new TreeMap<K, V>(comparator);
  this.treeMap.putAll(map);
}
origin: com.thoughtworks.xstream/xstream

public Map sort(final Class type, final Map nameMap) {
  TreeMap map = new TreeMap(comparator);
  map.putAll(nameMap);
  return map;
}
origin: looly/hutool

/**
 * 排序Map
 * 
 * @param <K> 键类型
 * @param <V> 值类型
 * @param map Map
 * @param comparator Entry比较器
 * @return {@link TreeMap}
 * @since 3.0.9
 */
public static <K, V> TreeMap<K, V> sort(Map<K, V> map, Comparator<? super K> comparator) {
  final TreeMap<K, V> result = new TreeMap<K, V>(comparator);
  result.putAll(map);
  return result;
}
origin: looly/hutool

/**
 * 排序Map
 * 
 * @param <K> 键类型
 * @param <V> 值类型
 * @param map Map
 * @param comparator Entry比较器
 * @return {@link TreeMap}
 * @since 3.0.9
 */
public static <K, V> TreeMap<K, V> sort(Map<K, V> map, Comparator<? super K> comparator) {
  final TreeMap<K, V> result = new TreeMap<K, V>(comparator);
  result.putAll(map);
  return result;
}
origin: apache/rocketmq

public void rollback() {
  try {
    this.lockTreeMap.writeLock().lockInterruptibly();
    try {
      this.msgTreeMap.putAll(this.consumingMsgOrderlyTreeMap);
      this.consumingMsgOrderlyTreeMap.clear();
    } finally {
      this.lockTreeMap.writeLock().unlock();
    }
  } catch (InterruptedException e) {
    log.error("rollback exception", e);
  }
}
origin: apache/pulsar

@JsonIgnore
public TreeMap<String, NamespaceBundleStats> getSortedBundleStats(ResourceType resType) {
  if (bundleStats == null) {
    return null;
  }
  NamespaceBundleStatsComparator nsc = new NamespaceBundleStatsComparator(bundleStats, resType);
  TreeMap<String, NamespaceBundleStats> sortedBundleStats = Maps.newTreeMap(nsc);
  sortedBundleStats.putAll(bundleStats);
  return sortedBundleStats;
}
origin: stackoverflow.com

sorted_map.putAll(map);
System.out.println("results: " + sorted_map);
origin: azkaban/azkaban

/**
 * Returns a map of all the flattened properties, the item in the returned map is sorted
 * alphabetically by the key value.
 *
 * @Return
 */
public Map<String, String> getFlattened() {
 final TreeMap<String, String> returnVal = new TreeMap<>();
 returnVal.putAll(getMapByPrefix(""));
 return returnVal;
}
origin: apache/rocketmq

  public void printBrokerRuntimeStats(final DefaultMQAdminExt defaultMQAdminExt, final String brokerAddr,
    final boolean printBroker) throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException {
    KVTable kvTable = defaultMQAdminExt.fetchBrokerRuntimeStats(brokerAddr);

    TreeMap<String, String> tmp = new TreeMap<String, String>();
    tmp.putAll(kvTable.getTable());

    Iterator<Entry<String, String>> it = tmp.entrySet().iterator();
    while (it.hasNext()) {
      Entry<String, String> next = it.next();
      if (printBroker) {
        System.out.printf("%-24s %-32s: %s%n", brokerAddr, next.getKey(), next.getValue());
      } else {
        System.out.printf("%-32s: %s%n", next.getKey(), next.getValue());
      }
    }
  }
}
origin: syncany/syncany

  @Override
  public DatabaseBranches clone() {
    DatabaseBranches clonedBranches = new DatabaseBranches();
    clonedBranches.branches.putAll(branches);
    
    return clonedBranches;
  }
}
origin: syncany/syncany

/**
 * Clones the file history, including its file versions. Note that file versions
 * are not cloned, but copied by reference.
 *
 * @return Returns cloned file history
 */
@Override
public PartialFileHistory clone() {
  PartialFileHistory clone = new PartialFileHistory(fileHistoryId);
  clone.versions.putAll(versions);
  return clone;
}
origin: looly/hutool

/**
 * 新建TreeMap,Key有序的Map
 * 
 * @param map Map
 * @param comparator Key比较器
 * @return TreeMap
 * @since 3.2.3
 */
public static <K, V> TreeMap<K, V> newTreeMap(Map<K, V> map, Comparator<? super K> comparator) {
  final TreeMap<K, V> treeMap = new TreeMap<>(comparator);
  if (false == isEmpty(map)) {
    treeMap.putAll(map);
  }
  return treeMap;
}
origin: looly/hutool

/**
 * 新建TreeMap,Key有序的Map
 * 
 * @param map Map
 * @param comparator Key比较器
 * @return TreeMap
 * @since 3.2.3
 */
public static <K, V> TreeMap<K, V> newTreeMap(Map<K, V> map, Comparator<? super K> comparator) {
  final TreeMap<K, V> treeMap = new TreeMap<>(comparator);
  if (false == isEmpty(map)) {
    treeMap.putAll(map);
  }
  return treeMap;
}
origin: igniterealtime/Smack

@Override
public TreeMap<Integer, T_SigPreKey> loadOmemoSignedPreKeys(OmemoDevice userDevice) {
  TreeMap<Integer, T_SigPreKey> sigPreKeys = getCache(userDevice).signedPreKeys;
  if (sigPreKeys.isEmpty() && persistent != null) {
    sigPreKeys.putAll(persistent.loadOmemoSignedPreKeys(userDevice));
  }
  return new TreeMap<>(sigPreKeys);
}
origin: igniterealtime/Smack

@Override
public TreeMap<Integer, T_PreKey> loadOmemoPreKeys(OmemoDevice userDevice) {
  TreeMap<Integer, T_PreKey> preKeys = getCache(userDevice).preKeys;
  if (preKeys.isEmpty() && persistent != null) {
    preKeys.putAll(persistent.loadOmemoPreKeys(userDevice));
  }
  return new TreeMap<>(preKeys);
}
origin: neo4j/neo4j

  ReadableTransactionState build()
  {
    final ReadableTransactionState mock = Mockito.mock( ReadableTransactionState.class );
    doReturn( new UnmodifiableMap<>( updates ) ).when( mock ).getIndexUpdates( any( SchemaDescriptor.class ) );
    final TreeMap<ValueTuple, MutableLongDiffSetsImpl> sortedMap = new TreeMap<>( ValueTuple.COMPARATOR );
    sortedMap.putAll( updates );
    doReturn( sortedMap ).when( mock ).getSortedIndexUpdates( any( SchemaDescriptor.class ) );
    return mock;
  }
}
origin: stagemonitor/stagemonitor

  @SuppressWarnings("unchecked")
  private Map<String, Object> asMap(String json) throws java.io.IOException {
    final TreeMap<String, Object> result = new TreeMap<String, Object>();
    result.putAll(JsonUtils.getMapper().readValue(json, Map.class));
    return result;
  }
}
java.utilTreeMapputAll

Javadoc

Copies all of the mappings from the specified map to this map. These mappings replace any mappings that this map had for any of the keys currently in the specified map.

Popular methods of TreeMap

  • <init>
    Constructs a new tree map containing the same mappings and using the same ordering as the specified
  • put
    Associates the specified value with the specified key in this map. If the map previously contained a
  • get
    Returns the value to which the specified key is mapped, or null if this map contains no mapping for
  • entrySet
    Returns a Set view of the mappings contained in this map. The set's iterator returns the entries in
  • values
    Returns a Collection view of the values contained in this map. The collection's iterator returns the
  • size
    Returns the number of key-value mappings in this map.
  • keySet
    Returns a Set view of the keys contained in this map. The set's iterator returns the keys in ascendi
  • remove
    Removes the mapping for this key from this TreeMap if present.
  • containsKey
    Returns true if this map contains a mapping for the specified key.
  • isEmpty
  • clear
    Removes all of the mappings from this map. The map will be empty after this call returns.
  • firstKey
  • clear,
  • firstKey,
  • lastKey,
  • firstEntry,
  • tailMap,
  • lastEntry,
  • floorEntry,
  • headMap,
  • subMap

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JCheckBox (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now