java.util.TreeMap.findByObject()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(150)

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

TreeMap.findByObject介绍

暂无

代码示例

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

@Override public boolean containsKey(Object key) {
  return findByObject(key) != null;
}

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

@Override public V get(Object key) {
  Entry<K, V> entry = findByObject(key);
  return entry != null ? entry.getValue() : null;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

/**
 * Returns this map's entry that has the same key and value as {@code
 * entry}, or null if this map has no such entry.
 *
 * <p>This method uses the comparator for key equality rather than {@code
 * equals}. If this map's comparator isn't consistent with equals (such as
 * {@code String.CASE_INSENSITIVE_ORDER}), then {@code remove()} and {@code
 * contains()} will violate the collections API.
 */
Node<K, V> findByEntry(Entry<?, ?> entry) {
  Node<K, V> mine = findByObject(entry.getKey());
  boolean valuesEqual = mine != null && Objects.equal(mine.value, entry.getValue());
  return valuesEqual ? mine : null;
}

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

@Override public boolean containsKey(Object key) {
  return findByObject(key) != null;
}

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

@Override public boolean containsKey(Object key) {
  return findByObject(key) != null;
}

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

@Override public boolean containsKey(Object key) {
  return findByObject(key) != null;
}

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

@Override public V get(Object key) {
  Entry<K, V> entry = findByObject(key);
  return entry != null ? entry.getValue() : null;
}

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

@Override public V get(Object key) {
  Entry<K, V> entry = findByObject(key);
  return entry != null ? entry.getValue() : null;
}

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

@Override public V get(Object key) {
  Entry<K, V> entry = findByObject(key);
  return entry != null ? entry.getValue() : null;
}

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

@Override public V get(Object key) {
  Entry<K, V> entry = findByObject(key);
  return entry != null ? entry.getValue() : null;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

/**
 * Returns this map's entry that has the same key and value as {@code
 * entry}, or null if this map has no such entry.
 *
 * <p>This method uses the comparator for key equality rather than {@code
 * equals}. If this map's comparator isn't consistent with equals (such as
 * {@code String.CASE_INSENSITIVE_ORDER}), then {@code remove()} and {@code
 * contains()} will violate the collections API.
 */
Node<K, V> findByEntry(Entry<?, ?> entry) {
  Node<K, V> mine = findByObject(entry.getKey());
  boolean valuesEqual = mine != null && Objects.equal(mine.value, entry.getValue());
  return valuesEqual ? mine : null;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

Node<K, V> removeInternalByKey(Object key) {
  Node<K, V> node = findByObject(key);
  if (node != null) {
    removeInternal(node);
  }
  return node;
}

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

/**
 * Returns this map's entry that has the same key and value as {@code
 * entry}, or null if this map has no such entry.
 *
 * <p>This method uses the comparator for key equality rather than {@code
 * equals}. If this map's comparator isn't consistent with equals (such as
 * {@code String.CASE_INSENSITIVE_ORDER}), then {@code remove()} and {@code
 * contains()} will violate the collections API.
 */
Node<K, V> findByEntry(Entry<?, ?> entry) {
  Node<K, V> mine = findByObject(entry.getKey());
  boolean valuesEqual = mine != null && Objects.equal(mine.value, entry.getValue());
  return valuesEqual ? mine : null;
}

相关文章