/** * A sensible definition of {@link #lowerKey} in terms of {@code lowerEntry}. If you override * {@link #lowerEntry}, you may wish to override {@code lowerKey} to forward to this * implementation. */ protected K standardLowerKey(K key) { return keyOrNull(lowerEntry(key)); }
@Override public K floorKey(K key) { return keyOrNull(floorEntry(key)); }
@Override public K lowerKey(K key) { return Maps.keyOrNull(lowerEntry(key)); }
@Override public K ceilingKey(K key) { return Maps.keyOrNull(ceilingEntry(key)); }
/** * A sensible definition of {@link #ceilingKey} in terms of {@code ceilingEntry}. If you override * {@code ceilingEntry}, you may wish to override {@code ceilingKey} to forward to this * implementation. */ protected K standardCeilingKey(K key) { return keyOrNull(ceilingEntry(key)); }
/** * A sensible definition of {@link #floorKey} in terms of {@code floorEntry}. If you override * {@code floorEntry}, you may wish to override {@code floorKey} to forward to this * implementation. */ protected K standardFloorKey(K key) { return keyOrNull(floorEntry(key)); }
/** * A sensible definition of {@link #higherKey} in terms of {@code higherEntry}. If you override * {@code higherEntry}, you may wish to override {@code higherKey} to forward to this * implementation. */ protected K standardHigherKey(K key) { return keyOrNull(higherEntry(key)); }
@Override public K higherKey(K key) { return keyOrNull(higherEntry(key)); }
@Override public K floorKey(K key) { return Maps.keyOrNull(floorEntry(key)); }
@Override public K higherKey(K key) { return Maps.keyOrNull(higherEntry(key)); }
@Override public K lowerKey(K key) { return keyOrNull(lowerEntry(key)); }
@Override public K ceilingKey(K key) { return keyOrNull(ceilingEntry(key)); }
/** * A sensible definition of {@link #ceilingKey} in terms of {@code ceilingEntry}. If you override * {@code ceilingEntry}, you may wish to override {@code ceilingKey} to forward to this * implementation. */ protected K standardCeilingKey(K key) { return keyOrNull(ceilingEntry(key)); }
@Override public K higherKey(K key) { return keyOrNull(higherEntry(key)); }
/** * A sensible definition of {@link #lowerKey} in terms of {@code lowerEntry}. If you override * {@link #lowerEntry}, you may wish to override {@code lowerKey} to forward to this * implementation. */ protected K standardLowerKey(K key) { return keyOrNull(lowerEntry(key)); }
/** * A sensible definition of {@link #floorKey} in terms of {@code floorEntry}. If you override * {@code floorEntry}, you may wish to override {@code floorKey} to forward to this * implementation. */ protected K standardFloorKey(K key) { return keyOrNull(floorEntry(key)); }
/** * A sensible definition of {@link #higherKey} in terms of {@code higherEntry}. If you override * {@code higherEntry}, you may wish to override {@code higherKey} to forward to this * implementation. */ protected K standardHigherKey(K key) { return keyOrNull(higherEntry(key)); }
@Override public K floorKey(K key) { return Maps.keyOrNull(floorEntry(key)); }
@Override public K pollLast() { return keyOrNull(map().pollLastEntry()); }
@Override public K pollFirst() { return keyOrNull(map().pollFirstEntry()); }