java.util.concurrent.ConcurrentSkipListMap.buildFromSorted()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(123)

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

ConcurrentSkipListMap.buildFromSorted介绍

[英]Streamlined bulk insertion to initialize from elements of given sorted map. Call only from constructor or clone method.
[中]优化了批量插入以从给定排序映射的元素初始化。仅从构造函数或克隆方法调用。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: robovm/robovm

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

代码示例来源:origin: MobiVM/robovm

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: ibinti/bugvm

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Constructs a new map containing the same mappings and using the
 * same ordering as the specified sorted map.
 *
 * @param m the sorted map whose mappings are to be placed in this
 *        map, and whose comparator is to be used to sort this map
 * @throws NullPointerException if the specified sorted map or any of
 *         its keys or values are null
 */
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
  this.comparator = m.comparator();
  initialize();
  buildFromSorted(m);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * Returns a shallow copy of this <tt>ConcurrentSkipListMap</tt>
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  ConcurrentSkipListMap<K,V> clone = null;
  try {
    clone = (ConcurrentSkipListMap<K,V>) super.clone();
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
  clone.initialize();
  clone.buildFromSorted(this);
  return clone;
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * Returns a shallow copy of this <tt>ConcurrentSkipListMap</tt>
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  ConcurrentSkipListMap<K,V> clone = null;
  try {
    clone = (ConcurrentSkipListMap<K,V>) super.clone();
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
  clone.initialize();
  clone.buildFromSorted(this);
  return clone;
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * Returns a shallow copy of this <tt>ConcurrentSkipListMap</tt>
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  ConcurrentSkipListMap<K,V> clone = null;
  try {
    clone = (ConcurrentSkipListMap<K,V>) super.clone();
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
  clone.initialize();
  clone.buildFromSorted(this);
  return clone;
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

代码示例来源:origin: com.jtransc/jtransc-rt

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

代码示例来源:origin: ibinti/bugvm

/**
 * Returns a shallow copy of this {@code ConcurrentSkipListMap}
 * instance. (The keys and values themselves are not cloned.)
 *
 * @return a shallow copy of this map
 */
public ConcurrentSkipListMap<K,V> clone() {
  try {
    @SuppressWarnings("unchecked")
    ConcurrentSkipListMap<K,V> clone =
      (ConcurrentSkipListMap<K,V>) super.clone();
    clone.initialize();
    clone.buildFromSorted(this);
    return clone;
  } catch (CloneNotSupportedException e) {
    throw new InternalError();
  }
}

相关文章

微信公众号

最新文章

更多

ConcurrentSkipListMap类方法