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

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

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

ConcurrentSkipListMap.comparator介绍

[英]The comparator used to maintain order in this map, or null if using natural ordering.
[中]用于维护此映射中的顺序的比较器,如果使用自然顺序,则为null。

代码示例

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

代码示例来源:origin: cinchapi/concourse

@Override
public Comparator<? super K> comparator() {
  return sorted.comparator();
}

代码示例来源:origin: cinchapi/concourse

@Override
public Comparator<? super T> comparator() {
  return backing.comparator();
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

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

public Comparator<? super K> comparator() {
  Comparator<? super K> cmp = m.comparator();
  if (isDescending)
    return Collections.reverseOrder(cmp);
  else
    return cmp;
}

代码示例来源:origin: org.apache.jackrabbit/oak-store-document

/**
 * Adds a new commit with revision <code>r</code> to this branch.
 *
 * @param r the revision of the branch commit to add.
 * @throws IllegalArgumentException if r is not a branch revision.
 */
void addCommit(@NotNull Revision r) {
  checkArgument(checkNotNull(r).isBranch(), "Not a branch revision: %s", r);
  Revision last = commits.lastKey();
  checkArgument(commits.comparator().compare(r, last) > 0);
  commits.put(r, new BranchCommitImpl(commits.get(last).getBase(), r));
}

代码示例来源:origin: apache/jackrabbit-oak

/**
 * Adds a new commit with revision <code>r</code> to this branch.
 *
 * @param r the revision of the branch commit to add.
 * @throws IllegalArgumentException if r is not a branch revision.
 */
void addCommit(@NotNull Revision r) {
  checkArgument(checkNotNull(r).isBranch(), "Not a branch revision: %s", r);
  Revision last = commits.lastKey();
  checkArgument(commits.comparator().compare(r, last) > 0);
  commits.put(r, new BranchCommitImpl(commits.get(last).getBase(), r));
}

相关文章

ConcurrentSkipListMap类方法