<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
    主站蜘蛛池模板: 国产a不卡片精品免费观看| 日韩电影免费在线观看| 人妻视频一区二区三区免费| 久久精品国产精品亚洲艾| 99麻豆久久久国产精品免费| 国产成人亚洲精品狼色在线 | 精品无码一级毛片免费视频观看| 日韩视频免费一区二区三区| 四虎亚洲精品高清在线观看| 夜夜嘿视频免费看| 老司机亚洲精品影院在线观看| 国产又黄又爽又刺激的免费网址| 亚洲AV永久无码精品网站在线观看 | 免费在线观看a级毛片| 一区二区三区精品高清视频免费在线播放 | 亚洲第一区在线观看| 亚洲AV电影天堂男人的天堂| 午夜色a大片在线观看免费| 国产精品成人亚洲| 成人亚洲性情网站WWW在线观看| 又黄又大的激情视频在线观看免费视频社区在线 | 国产精品自在自线免费观看| 成人亚洲国产精品久久| 亚洲成A人片77777国产| 国产乱子伦精品免费视频| 亚洲AV人无码激艳猛片| 8888四色奇米在线观看免费看| 亚洲AV无码一区二区三区人 | 久久久久精品国产亚洲AV无码| 永久久久免费浮力影院| 国产亚洲美女精品久久| 亚洲情XO亚洲色XO无码| 最近2019免费中文字幕6| 色天使亚洲综合在线观看| 亚洲天堂在线视频| 最近免费中文在线视频| 免费国产黄网站在线看| 91亚洲国产成人久久精品网站| 免费无码黄网站在线观看| 国产拍拍拍无码视频免费| 亚洲熟伦熟女专区hd高清|