public K lastKey() { ConcurrentSkipListMap.Node<K,V> n = lastNode(); if (n != null) { K last = n.key; if (inHalfOpenRange(last)) return last; } throw new NoSuchElementException(); }
public Map.Entry<K,V> lastEntry() { for (;;) { ConcurrentSkipListMap.Node<K,V> n = lastNode(); if (n == null || !inHalfOpenRange(n.key)) return null; Map.Entry<K,V> e = n.createSnapshot(); if (e != null) return e; } }