<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
    主站蜘蛛池模板: 最近免费中文字幕高清大全| 美美女高清毛片视频黄的一免费 | 一个人看的www免费在线视频| 免费无码又爽又高潮视频| 亚洲综合小说另类图片动图| 91九色精品国产免费| 99久久亚洲综合精品成人网| 亚洲免费视频网站| 亚洲国产精品白丝在线观看| 久久九九兔免费精品6| 亚洲乱码无限2021芒果| 无码视频免费一区二三区| 亚洲爆乳少妇无码激情| 伊在人亚洲香蕉精品区麻豆| 美女被免费网站视频在线| 亚洲色偷偷狠狠综合网| 免费a级毛片无码a∨免费软件 | 2021在线观看视频精品免费| 水蜜桃亚洲一二三四在线| 亚洲精品视频免费看| 亚洲综合一区二区三区四区五区 | 99视频在线精品免费| 亚洲1234区乱码| 国产一区二区三区无码免费| 一个人看的hd免费视频| 亚洲AV无码乱码国产麻豆| 五月亭亭免费高清在线| 亚洲AV无码一区二区一二区| 国产精品亚洲二区在线观看 | 拍拍拍无挡免费视频网站| 亚洲精品456在线播放| 精品国产精品久久一区免费式| 国产99精品一区二区三区免费| 久久久久久亚洲Av无码精品专口| 青苹果乐园免费高清在线| 青青草97国产精品免费观看| 久久青青草原亚洲av无码app | 你是我的城池营垒免费看| 亚洲精品国产情侣av在线| 全黄性性激高免费视频| 四虎影视在线影院在线观看免费视频 |