<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Jcat
    寵辱不驚,閑看庭前花開花落~~
    posts - 173,comments - 67,trackbacks - 0
    Experience
    To know how dose List.remove(Object) work, I do many test sample. But I still feel not very realizing. Finally, I?took a look at?souce code, and then I knew everything!
    public?boolean?remove(Object?o)?{
    ????
    if?(o?==?null)?{
    ????????????
    for?(int?index?=?0;?index?<?size;?index++)
    ????????
    if?(elementData[index]?==?null)?{
    ????????????fastRemove(index);
    ????????????
    return?true;
    ????????}

    ????}
    ?else?{
    ????????
    for?(int?index?=?0;?index?<?size;?index++)
    ????????
    if?(o.equals(elementData[index]))?{
    ????????????fastRemove(index);
    ????????????
    return?true;
    ????????}

    ????????}

    ????
    return?false;
    ????}
    1. List store very object's reference but object's own.
    2. remove(Object) will remove the first reference in List which refer to?the object
    3. If you want to change an object to a new index: back up it--> remove it--> re-add it

    Experience
    I create a class to handle something annotated by Annotations. But it doesn't work. I found out it is returned false by Class.getMethod().isAnnotationPresent(Todo.class). Finally, I got the reason by reading source code.
    public?enum?RetentionPolicy?{
    ????
    /**
    ?????*?Annotations?are?to?be?discarded?by?the?compiler.
    ?????
    */
    ????SOURCE,

    ????
    /**
    ?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler
    ?????*?but?need?not?be?retained?by?the?VM?at?run?time.??This?is?the?default
    ?????*?behavior.
    ?????
    */
    ????CLASS,

    ????
    /**
    ?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler?and
    ?????*?retained?by?the?VM?at?run?time,?so?they?may?be?read?reflectively.
    ?????*
    ?????*?
    @see?java.lang.reflect.AnnotatedElement
    ?????
    */
    ????RUNTIME
    }

    posted on 2006-08-03 18:43 Jcat 閱讀(340) 評論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 一级做性色a爰片久久毛片免费| 99热这里只有精品免费播放| 无人视频在线观看免费播放影院| 国产真人无码作爱视频免费| 成年午夜视频免费观看视频| 国产成人亚洲综合无码| 亚洲最大天堂无码精品区| 18禁超污无遮挡无码免费网站| 日韩在线免费播放| 亚洲欧洲精品久久| 337p日本欧洲亚洲大胆人人| 啦啦啦完整版免费视频在线观看| 中文字幕在亚洲第一在线| 亚洲欧美国产日韩av野草社区| 污污网站18禁在线永久免费观看| 亚洲精品无码99在线观看| 亚洲中文无码卡通动漫野外| 日本一区二区三区日本免费| 九九免费久久这里有精品23| 亚洲码国产精品高潮在线| 伊人久久国产免费观看视频| 日韩毛片免费在线观看| 色吊丝免费观看网站| 免费看片A级毛片免费看| 亚洲乱码一二三四区国产| 人妻无码一区二区三区免费 | 久久精品国产精品亚洲色婷婷| 国产亚洲综合精品一区二区三区| 免费看国产精品3a黄的视频| 亚洲酒色1314狠狠做| 久久午夜羞羞影院免费观看| 亚洲一区二区三区91| 我的小后妈韩剧在线看免费高清版| 亚洲色av性色在线观无码| 日韩在线看片免费人成视频播放| 中文无码日韩欧免费视频| 国产综合精品久久亚洲| A国产一区二区免费入口| 亚洲午夜国产精品无码老牛影视 | 99久久免费精品国产72精品九九| 福利片免费一区二区三区|