本文整理了Java中java.util.TreeMap.find()
方法的一些代码示例,展示了TreeMap.find()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TreeMap.find()
方法的具体详情如下:
包路径:java.util.TreeMap
类名称:TreeMap
方法名:find
[英]Returns the node at or adjacent to the given key, creating it if requested.
[中]返回给定键处或其附近的节点,并在请求时创建该节点。
代码示例来源:origin: robovm/robovm
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: robovm/robovm
@SuppressWarnings("unchecked") // this method throws ClassCastExceptions!
Node<K, V> findByObject(Object key) {
return find((K) key, EQUAL);
}
代码示例来源:origin: robovm/robovm
public K higherKey(K key) {
Entry<K, V> entry = find(key, HIGHER);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: robovm/robovm
public K lowerKey(K key) {
Entry<K, V> entry = find(key, LOWER);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: robovm/robovm
public K floorKey(K key) {
Entry<K, V> entry = find(key, FLOOR);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: robovm/robovm
public K ceilingKey(K key) {
Entry<K, V> entry = find(key, CEILING);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: robovm/robovm
public Entry<K, V> floorEntry(K key) {
return immutableCopy(find(key, FLOOR));
}
代码示例来源:origin: robovm/robovm
public Entry<K, V> ceilingEntry(K key) {
return immutableCopy(find(key, CEILING));
}
代码示例来源:origin: robovm/robovm
public Entry<K, V> higherEntry(K key) {
return immutableCopy(find(key, HIGHER));
}
代码示例来源:origin: robovm/robovm
public Entry<K, V> lowerEntry(K key) {
return immutableCopy(find(key, LOWER));
}
代码示例来源:origin: MobiVM/robovm
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: com.bugvm/bugvm-rt
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: com.jtransc/jtransc-rt
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: ibinti/bugvm
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: MobiVM/robovm
@SuppressWarnings("unchecked") // this method throws ClassCastExceptions!
Node<K, V> findByObject(Object key) {
return find((K) key, EQUAL);
}
代码示例来源:origin: com.gluonhq/robovm-rt
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
V putInternal(K key, V value) {
Node<K, V> created = find(key, Relation.CREATE);
V result = created.value;
created.value = value;
return result;
}
代码示例来源:origin: MobiVM/robovm
public K lowerKey(K key) {
Entry<K, V> entry = find(key, LOWER);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: MobiVM/robovm
public K floorKey(K key) {
Entry<K, V> entry = find(key, FLOOR);
return entry != null ? entry.getKey() : null;
}
代码示例来源:origin: ibinti/bugvm
public K floorKey(K key) {
Entry<K, V> entry = find(key, FLOOR);
return entry != null ? entry.getKey() : null;
}
内容来源于网络,如有侵权,请联系作者删除!