Code example for NavigableMap

Methods: removecomparator

0
    delegate.clear();
  } 
 
  @SuppressWarnings("unchecked") 
  @Override public Comparator<? super K> comparator() {
    Comparator<? super K> comparator = delegate.comparator();
    if (comparator == null) {
      comparator = NATURAL_ORDER;
    } 
    return comparator;
  } 
 
  @Override public boolean containsKey(Object key) {
    try { 
      return delegate.containsKey(checkValid(key));
    } catch (NullPointerException e) {
      return false; 
    } catch (ClassCastException e) {
      return false; 
    } 
  } 
 
  @Override public boolean containsValue(Object value) {
    return delegate.containsValue(value);
  } 
 
  @Override public NavigableSet<K> descendingKeySet() {
    return delegate.descendingKeySet();
  } 
 
  @Override public NavigableMap<K, V> descendingMap() {
    return new SafeTreeMap<K, V>(delegate.descendingMap());
  } 
 
  @Override public Set<Entry<K, V>> entrySet() {
    return delegate.entrySet();
  } 
 
  @Override public Entry<K, V> firstEntry() {
    return delegate.firstEntry();
  } 
 
  @Override public K firstKey() { 
    return delegate.firstKey();
  } 
 
  @Override public Entry<K, V> floorEntry(K key) {
    return delegate.floorEntry(checkValid(key));
  } 
 
  @Override public K floorKey(K key) {
    return delegate.floorKey(checkValid(key));
  } 
 
  @Override public V get(Object key) {
    return delegate.get(checkValid(key));
  } 
 
  @Override public SortedMap<K, V> headMap(K toKey) {
    return headMap(toKey, false);
  } 
 
  @Override public NavigableMap<K, V> headMap(K toKey, boolean inclusive) {
    return new SafeTreeMap<K, V>( 
        delegate.headMap(checkValid(toKey), inclusive));
  } 
 
  @Override public Entry<K, V> higherEntry(K key) {
    return delegate.higherEntry(checkValid(key));
  } 
 
  @Override public K higherKey(K key) {
    return delegate.higherKey(checkValid(key));
  } 
 
  @Override public boolean isEmpty() { 
    return delegate.isEmpty();
  } 
 
  @Override public NavigableSet<K> keySet() {
    return navigableKeySet(); 
  } 
 
  @Override public Entry<K, V> lastEntry() {
    return delegate.lastEntry();
  } 
 
  @Override public K lastKey() { 
    return delegate.lastKey();
  } 
 
  @Override public Entry<K, V> lowerEntry(K key) {
    return delegate.lowerEntry(checkValid(key));
  } 
 
  @Override public K lowerKey(K key) {
    return delegate.lowerKey(checkValid(key));
  } 
 
  @Override public NavigableSet<K> navigableKeySet() {
    return delegate.navigableKeySet();
  } 
 
  @Override public Entry<K, V> pollFirstEntry() {
    return delegate.pollFirstEntry();
  } 
 
  @Override public Entry<K, V> pollLastEntry() {
    return delegate.pollLastEntry();
  } 
 
  @Override public V put(K key, V value) {
    return delegate.put(checkValid(key), value);
  } 
 
  @Override public void putAll(Map<? extends K, ? extends V> map) {
    for (K key : map.keySet()) {
      checkValid(key);
    } 
    delegate.putAll(map);
  } 
 
  @Override public V remove(Object key) {
    return delegate.remove(checkValid(key));
  } 
 
  @Override public int size() { 
    return delegate.size();
  }