zoukankan      html  css  js  c++  java
  • 嵌套类引用实例化的外部类的方法

    class:java.util.HashMap

    line:814

    HashMap.this.removeEntryForKey(k)

     1 public class HashMap<K,V>
    2 extends AbstractMap<K,V>
    3 implements Map<K,V>, Cloneable, Serializable
    4 {
    5 ...
    6 final Entry<K,V> removeEntryForKey(Object key) {...}
    7 private abstract class HashIterator<E> implements Iterator<E> {
    8 Entry<K,V> next; // next entry to return
    9 int expectedModCount; // For fast-fail
    10 int index; // current slot
    11 Entry<K,V> current; // current entry
    12
    13 HashIterator() {...}
    14
    15 public final boolean hasNext() {...}
    16
    17 final Entry<K,V> nextEntry() {...}
    18
    19 public void remove() {
    20 if (current == null)
    21 throw new IllegalStateException();
    22 if (modCount != expectedModCount)
    23 throw new ConcurrentModificationException();
    24 Object k = current.key;
    25 current = null;
    26 HashMap.this.removeEntryForKey(k);
    27 expectedModCount = modCount;
    28 }
    29 }
    30 }



  • 相关阅读:
    float浮动
    数据库基础操作
    Python re 模块
    I/O模型的使用
    函数形参与实参
    内置函数重写_运算符重载
    导入模块_导入包_标准库模块
    异常处理
    闭包
    函数式编程
  • 原文地址:https://www.cnblogs.com/tao_/p/2220460.html
Copyright © 2011-2022 走看看