亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? linkedlist.java

?? 這是學習Java必須讀懂兩套源代碼
?? JAVA
字號:
/**
 * $RCSfile: LinkedList.java,v $
 * $Revision: 1.2 $
 * $Date: 2000/12/21 17:47:20 $
 *
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.Yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@Yasna.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.Yasna.com>.
 */

package com.Yasna.util;

import java.util.*;

/**
 * Simple LinkedList implementation. The main feature is that list nodes
 * are public, which allows very fast delete operations (when one has a
 * reference to the node that is to be deleted).<p>
 *
 * The linked list implementation was specifically written for the CoolServlets
 * cache system. While it can be used as a general purpose linked list, for
 * most applications, it is more suitable to use the linked list that is part
 * of the Java Collections package.
 */
public class LinkedList {

    /**
     * The root of the list keeps a reference to both the first and last
     * elements of the list.
     */
    private LinkedListNode head = new LinkedListNode("head", null, null);

    /**
     * Creates a new linked list.
     */
    public LinkedList() {
        head.next = head.previous = head;
    }

    /**
     * Returns the first linked list node in the list.
     *
     * @return the first element of the list.
     */
    public LinkedListNode getFirst() {
        LinkedListNode node = head.next;
        if (node == head) {
            return null;
        }
        return node;
    }

    /**
     * Returns the last linked list node in the list.
     *
     * @return the last element of the list.
     */
    public LinkedListNode getLast() {
        LinkedListNode node = head.previous;
        if (node == head) {
            return null;
        }
        return node;
    }

    /**
     * Adds a node to the beginning of the list.
     *
     * @param node the node to add to the beginning of the list.
     */
    public LinkedListNode addFirst(LinkedListNode node) {
        node.next = head.next;
        node.previous = head;
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Adds an object to the beginning of the list by automatically creating a
     * a new node and adding it to the beginning of the list.
     *
     * @param object the object to add to the beginning of the list.
     * @return the node created to wrap the object.
     */
    public LinkedListNode addFirst(Object object) {
        LinkedListNode node = new LinkedListNode(object, head.next, head);
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Adds an object to the end of the list by automatically creating a
     * a new node and adding it to the end of the list.
     *
     * @param object the object to add to the end of the list.
     * @return the node created to wrap the object.
     */
    public LinkedListNode addLast(Object object) {
        LinkedListNode node = new LinkedListNode(object, head, head.previous);
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Erases all elements in the list and re-initializes it.
     */
    public void clear() {
        //Remove all references in the list.
        LinkedListNode node = getLast();
        while (node != null) {
            node.remove();
            node = getLast();
        }

        //Re-initialize.
        head.next = head.previous = head;
    }

    /**
     * Returns a String representation of the linked list with a comma
     * delimited list of all the elements in the list.
     *
     * @return a String representation of the LinkedList.
     */
    public String toString() {
        LinkedListNode node = head.next;
        StringBuffer buf = new StringBuffer();
        while (node != head) {
            buf.append(node.toString()).append(", ");
            node = node.next;
        }
        return buf.toString();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三区久久久| 轻轻草成人在线| 成人久久视频在线观看| 日韩精品一区在线观看| 国内精品国产成人| 久久综合久久鬼色| 国产一二精品视频| 中文字幕在线观看不卡视频| 成人污视频在线观看| 亚洲精品视频在线看| 欧美私模裸体表演在线观看| 免费欧美在线视频| 国产精品少妇自拍| 欧美一a一片一级一片| 秋霞av亚洲一区二区三| 久久久三级国产网站| 91视频.com| 男女男精品网站| 亚洲国产成人在线| 欧美吻胸吃奶大尺度电影| 日韩av中文在线观看| 欧美国产禁国产网站cc| 欧美色图免费看| 国内精品写真在线观看| 亚洲欧洲中文日韩久久av乱码| 欧美日韩亚洲综合| 国产激情一区二区三区| 一区二区三国产精华液| 欧美一个色资源| 91在线视频播放| 免费人成在线不卡| 亚洲男人天堂av网| 亚洲精品一区二区三区精华液| fc2成人免费人成在线观看播放 | www.亚洲人| 午夜精品爽啪视频| 国产精品美女久久久久av爽李琼| 欧美日韩另类一区| 国产成人精品影院| 天堂蜜桃一区二区三区| 中文字幕中文字幕一区二区| 91精品国产综合久久精品麻豆 | 国产精品护士白丝一区av| 欧美高清视频不卡网| 成人爱爱电影网址| 久久99国产精品免费| 亚洲在线免费播放| 国产精品久久久久婷婷二区次| 欧美一卡二卡在线观看| 成人在线综合网| 久久66热偷产精品| 亚洲大片在线观看| 亚洲视频在线一区二区| 久久久久9999亚洲精品| 91精品国产综合久久福利| 色综合久久久久久久久久久| 国产在线不卡一区| 久久精品噜噜噜成人88aⅴ | 亚洲国产成人午夜在线一区| 欧美一区二区大片| 欧美精品色一区二区三区| 在线精品视频免费观看| av一区二区三区四区| 国产sm精品调教视频网站| 美女视频第一区二区三区免费观看网站| 亚洲综合一二三区| 亚洲品质自拍视频网站| 亚洲美女视频一区| 亚洲品质自拍视频| 亚洲摸摸操操av| 综合久久给合久久狠狠狠97色| 国产清纯白嫩初高生在线观看91| 精品免费国产二区三区| 日韩精品在线一区| 久久久久久99久久久精品网站| 精品少妇一区二区三区| 日韩欧美国产麻豆| 欧美mv和日韩mv国产网站| 欧美一区二区三区白人| 91精品国产91热久久久做人人| 欧美浪妇xxxx高跟鞋交| 欧美日本一道本| 欧美肥胖老妇做爰| 一区二区欧美精品| 久久蜜臀精品av| 欧美日韩成人在线一区| 久久国内精品自在自线400部| 亚洲免费av高清| 国产精品久久久久永久免费观看| 欧美高清www午色夜在线视频| 99在线精品观看| 国产91在线观看丝袜| 亚洲一区视频在线| 一区二区三区精密机械公司| 久久精品日韩一区二区三区| 日韩女同互慰一区二区| 日韩欧美久久久| 欧美成人一区二区三区在线观看| 欧美日韩在线精品一区二区三区激情| 国产精品一区二区视频| 国产一区二区美女诱惑| 亚洲成人三级小说| 一区二区三区欧美在线观看| 日日嗨av一区二区三区四区| 国产精品久久久久影院亚瑟| 欧美日韩不卡一区二区| 91亚洲精品久久久蜜桃| 日本韩国欧美一区二区三区| 日韩欧美亚洲另类制服综合在线| 日韩电影免费在线观看网站| 欧美精品丝袜中出| jvid福利写真一区二区三区| 欧美亚州韩日在线看免费版国语版| 欧美精选午夜久久久乱码6080| 日韩欧美中文一区二区| 国产欧美一区二区在线观看| 亚洲精品高清在线观看| 免费成人在线网站| 国产精品一级在线| 欧美日本不卡视频| 精品欧美久久久| 1024精品合集| 亚洲精品va在线观看| 亚洲综合免费观看高清完整版 | 亚洲成人免费av| 亚洲精品一区二区三区四区高清| 在线观看国产一区二区| 欧美在线观看一二区| 欧美色图片你懂的| 亚洲永久精品大片| 欧美大肚乱孕交hd孕妇| 婷婷亚洲久悠悠色悠在线播放 | 国产剧情在线观看一区二区| 国产乱理伦片在线观看夜一区 | 91欧美一区二区| 欧美精品777| 日韩视频免费观看高清完整版 | 国产成人午夜电影网| 91麻豆视频网站| 欧美日韩国产123区| 国产精品美女久久久久久2018 | 中文字幕一区二区三区av| 日韩精品一区第一页| av电影天堂一区二区在线 | 99久久精品国产一区| 欧美福利电影网| 中文字幕视频一区| 午夜在线成人av| 日本道精品一区二区三区| 日韩精品一区二| 亚洲成人动漫一区| 97久久精品人人爽人人爽蜜臀| 欧美日韩一级黄| 亚洲综合在线第一页| 成人爽a毛片一区二区免费| 91精品国产高清一区二区三区蜜臀| 国产精品理伦片| 久久99精品久久久久| 欧美日韩在线播| 亚洲欧美一区二区久久| 国产一区啦啦啦在线观看| 欧美日韩精品一区二区天天拍小说| 欧美—级在线免费片| 日本不卡视频在线| 精品视频999| 亚洲蜜桃精久久久久久久| 成人中文字幕电影| 久久精品亚洲乱码伦伦中文 | 成人永久aaa| 91精品国产麻豆国产自产在线 | 91麻豆123| 国产精品久久久久影院亚瑟| 色综合一区二区三区| 自拍偷拍亚洲综合| 色综合久久久网| 视频一区免费在线观看| 91精品国产欧美日韩| 国产成人综合在线观看| 国产精品久线观看视频| 色婷婷激情综合| 一区二区免费在线播放| 色噜噜狠狠一区二区三区果冻| 国产精品无码永久免费888| 国产精品一区免费在线观看| 国产亚洲精品精华液| 精品av综合导航| 欧美一区二区三区视频在线| 色噜噜偷拍精品综合在线| 99久久久免费精品国产一区二区| 国产精品无遮挡| 色94色欧美sute亚洲线路一ni| 亚洲第一成人在线| 亚洲国产精品成人综合 | 26uuu国产一区二区三区| 亚洲曰韩产成在线| 欧美色爱综合网| 亚洲成人激情综合网| 精品少妇一区二区三区免费观看| 久色婷婷小香蕉久久| 久久久国产精华|