<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 閱讀(351) 評論(0)  編輯  收藏 所屬分類: Java
    主站蜘蛛池模板: 亚洲av日韩aⅴ无码色老头| 亚洲JIZZJIZZ中国少妇中文| 亚洲视频中文字幕| 中文字幕成人免费高清在线视频| 亚洲VA综合VA国产产VA中| 国产精品亚洲а∨无码播放麻豆 | 久久国产免费观看精品3| 亚洲人成网址在线观看| 8x成人永久免费视频| 亚洲国产精品久久久久久| 88av免费观看| 亚洲中文字幕无码一去台湾| 成年轻人网站色免费看| 337p日本欧洲亚洲大胆人人| 亚洲精品国产综合久久一线| baoyu116.永久免费视频| 99亚洲精品高清一二区| 在线观看免费污视频| 特黄特色的大片观看免费视频| 亚洲区日韩区无码区| 国色精品va在线观看免费视频| 99久久亚洲综合精品成人网| 成年人视频在线观看免费| 美女视频黄a视频全免费网站一区 美女视频黄a视频全免费网站色 | 成人片黄网站色大片免费观看cn| 亚洲精品无码Av人在线观看国产| 一级毛片全部免费播放| 国产精品亚洲自在线播放页码 | 啦啦啦手机完整免费高清观看| 国产偷国产偷亚洲高清在线| 亚洲热妇无码AV在线播放| 黄色永久免费网站| 免费在线观看亚洲| 久久久久久亚洲AV无码专区| 日韩免费一级毛片| a级毛片免费播放| 亚洲中文字幕无码爆乳| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 亚洲第一极品精品无码久久| 成人免费福利电影| 3344在线看片免费|